version 1.54, 2002/09/19 15:27:31 |
version 1.55, 2002/09/19 20:58:50 |
|
|
struct pidinfo *pltmp; |
struct pidinfo *pltmp; |
|
|
for (pltmp = pidlist; pltmp < pl; pltmp++) { |
for (pltmp = pidlist; pltmp < pl; pltmp++) { |
if ((strcmp(pltmp->file, q->pidfile) == 0 && |
if ((q->pidfile && |
pltmp->signal == q->signal) || (q->runcmd && |
strcmp(pltmp->file, q->pidfile) == 0 && |
|
pltmp->signal == q->signal) || |
|
(q->runcmd && |
strcmp(q->runcmd, pltmp->file) == 0)) |
strcmp(q->runcmd, pltmp->file) == 0)) |
break; |
break; |
} |
} |
|
|
run_command(char *cmd) |
run_command(char *cmd) |
{ |
{ |
if (noaction) |
if (noaction) |
(void)printf("\trun %s\n", cmd); |
(void)printf("run %s\n", cmd); |
else |
else |
system(cmd); |
system(cmd); |
} |
} |
|
|
working->runcmd = strdup(++q); |
working->runcmd = strdup(++q); |
if (working->runcmd == NULL) |
if (working->runcmd == NULL) |
err(1, "strdup"); |
err(1, "strdup"); |
|
working->pidfile = NULL; |
|
working->signal = -1; |
} else if (strncmp(q, "SIG", 3) == 0) { |
} else if (strncmp(q, "SIG", 3) == 0) { |
int i; |
int i; |
|
|