aboutsummaryrefslogtreecommitdiff
path: root/src/genrc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/genrc.c')
-rw-r--r--src/genrc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/genrc.c b/src/genrc.c
index 3f89d03..92b0fac 100644
--- a/src/genrc.c
+++ b/src/genrc.c
@@ -16,6 +16,7 @@ int genrc_signal_stop = SIGTERM;
16int genrc_signal_reload = SIGHUP; 16int genrc_signal_reload = SIGHUP;
17GENRC_PID_CLOSURE *genrc_pid_closure; 17GENRC_PID_CLOSURE *genrc_pid_closure;
18char *genrc_create_pidfile; 18char *genrc_create_pidfile;
19int genrc_verbose;
19 20
20 21
21enum { 22enum {
@@ -41,9 +42,10 @@ struct option longopts[] = {
41 { "sentinel", no_argument, 0, 'S' }, 42 { "sentinel", no_argument, 0, 'S' },
42 { "create-pidfile", required_argument, 0, OPT_CREATE_PIDFILE }, 43 { "create-pidfile", required_argument, 0, OPT_CREATE_PIDFILE },
43 { "version", no_argument, 0, OPT_VERSION }, 44 { "version", no_argument, 0, OPT_VERSION },
45 { "verbose", no_argument, 0, 'v' },
44 { NULL } 46 { NULL }
45}; 47};
46char shortopts[] = "c:hF:P:p:St:"; 48char shortopts[] = "c:hF:P:p:St:v";
47 49
48struct sigdefn { 50struct sigdefn {
49 char const *sig_name; 51 char const *sig_name;
@@ -402,6 +404,9 @@ main(int argc, char **argv)
402 case OPT_SIGNAL_STOP: 404 case OPT_SIGNAL_STOP:
403 setenv("GENRC_SIGNAL_STOP", optarg, 1); 405 setenv("GENRC_SIGNAL_STOP", optarg, 1);
404 break; 406 break;
407 case 'v':
408 genrc_verbose++;
409 break;
405 default: 410 default:
406 exit(1); 411 exit(1);
407 } 412 }
@@ -468,7 +473,7 @@ main(int argc, char **argv)
468 genrc_pid_closure = get_pid_closure(p); 473 genrc_pid_closure = get_pid_closure(p);
469 free(p); 474 free(p);
470 } else { 475 } else {
471 genrc_pid_closure = get_pid_closure("PROC"); 476 genrc_pid_closure = get_pid_closure(DEFAULT_PID_SOURCE);
472 } 477 }
473 478
474 argc -= optind; 479 argc -= optind;

Return to:

Send suggestions and report system problems to the System administrator.