
Путь: Toys/LSB, команды версии: Ver.4 Ver.9 pidof Комментарии в файле pidof.c :
Исходный текст в файле pidof.c #define FOR_pidof
#include "toys.h"
GLOBALS(
char *o;
)
static int print_pid(pid_t pid, char *name)
{
sprintf(toybuf, "%d", (int)pid);
if (comma_scan(TT.o, toybuf, 0)) return 0;
xprintf(" %s"+!!toys.exitval, toybuf);
toys.exitval = 0;
return FLAG(s);
}
void pidof_main(void)
{
toys.exitval = 1;
names_to_pid(toys.optargs, print_pid, FLAG(x));
if (!toys.exitval) xputc('\n');
} |
![]() |