Xinqi Bao's Git
4a6389620fdd8ca8169e0bc03f92b74f1e0f669b
1 /* See LICENSE file for copyright and license details. */
8 run_command(const char *cmd
)
15 fprintf(stderr
, "Failed to get command output for %s", cmd
);
18 p
= fgets(buf
, sizeof(buf
) - 1, fp
);
22 if ((p
= strrchr(buf
, '\n')) != NULL
)
25 return buf
[0] ? buf
: NULL
;