Lines 627-630
Link Here
|
627 |
char *name = NULL; |
627 |
char *name = NULL; |
628 |
char *pidfile = NULL; |
628 |
char *pidfile = NULL; |
|
|
629 |
char *retry = NULL; |
629 |
int sig = 0; |
630 |
int sig = 0; |
630 |
int nicelevel = 0; |
631 |
int nicelevel = 0; |
Lines 695-699
Link Here
|
695 |
|
696 |
|
696 |
case 'R': /* --retry <schedule>|<timeout> */ |
697 |
case 'R': /* --retry <schedule>|<timeout> */ |
697 |
parse_schedule(optarg, sig); |
698 |
retry = optarg; |
698 |
break; |
699 |
break; |
699 |
|
700 |
|
Lines 854-858
Link Here
|
854 |
*--argv = exec; |
855 |
*--argv = exec; |
855 |
|
856 |
|
856 |
if (stop || sig) { |
857 |
if (stop || sig != 0) { |
|
|
858 |
if (sig == 0) |
859 |
sig = SIGTERM; |
857 |
if (!*argv && !pidfile && !name && !uid) |
860 |
if (!*argv && !pidfile && !name && !uid) |
858 |
eerrorx("%s: --stop needs --exec, --pidfile," |
861 |
eerrorx("%s: --stop needs --exec, --pidfile," |
Lines 877-880
Link Here
|
877 |
" with --background", applet); |
880 |
" with --background", applet); |
878 |
} |
881 |
} |
|
|
882 |
|
879 |
/* Expand ~ */ |
883 |
/* Expand ~ */ |
880 |
if (ch_dir && *ch_dir == '~') |
884 |
if (ch_dir && *ch_dir == '~') |
Lines 956-969
Link Here
|
956 |
|
960 |
|
957 |
if (stop || sig) { |
961 |
if (stop || sig) { |
958 |
if (!sig) |
962 |
if (sig == 0) |
959 |
sig = SIGTERM; |
963 |
sig = SIGTERM; |
960 |
if (!stop) |
964 |
if (!stop) |
961 |
oknodo = true; |
965 |
oknodo = true; |
962 |
if (!TAILQ_FIRST(&schedule)) { |
966 |
if (retry) |
963 |
if (test || oknodo) |
967 |
parse_schedule(retry, sig); |
964 |
parse_schedule("0", sig); |
968 |
else if (test || oknodo) |
965 |
else |
969 |
parse_schedule("0", sig); |
966 |
parse_schedule(NULL, sig); |
970 |
else |
967 |
} |
971 |
parse_schedule(NULL, sig); |
968 |
i = run_stop_schedule(exec, (const char *const *)margv, |
972 |
i = run_stop_schedule(exec, (const char *const *)margv, |
969 |
pidfile, uid, quiet, verbose, test); |
973 |
pidfile, uid, quiet, verbose, test); |