Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 126783
Collapse All | Expand All

(-)start-stop-daemon.c.orig (-2 / +7 lines)
Lines 130-135 Link Here
130
static char *execname = NULL;
130
static char *execname = NULL;
131
static char *startas = NULL;
131
static char *startas = NULL;
132
static const char *pidfile = NULL;
132
static const char *pidfile = NULL;
133
static int isgrouppidfile = 0;	/* -G | --gpidfile command line option */
133
static char what_stop[1024];
134
static char what_stop[1024];
134
static const char *schedule_str = NULL;
135
static const char *schedule_str = NULL;
135
static const char *progname = "";
136
static const char *progname = "";
Lines 254-260 Link Here
254
255
255
	p = xmalloc(sizeof(*p));
256
	p = xmalloc(sizeof(*p));
256
	p->next = *list;
257
	p->next = *list;
257
	p->pid = pid;
258
	p->pid = (isgrouppidfile==0 ? pid : -pid);
258
	*list = p;
259
	*list = p;
259
}
260
}
260
261
Lines 287-292 Link Here
287
"Options (at least one of --exec|--pidfile|--user is required):\n"
288
"Options (at least one of --exec|--pidfile|--user is required):\n"
288
"  -x|--exec <executable>        program to start/check if it is running\n"
289
"  -x|--exec <executable>        program to start/check if it is running\n"
289
"  -p|--pidfile <pid-file>       pid file to check\n"
290
"  -p|--pidfile <pid-file>       pid file to check\n"
291
"  -G|--gpidfile <pid-file>      stop using a GPID\n"
290
"  -c|--chuid <name|uid[:group|gid]>\n"
292
"  -c|--chuid <name|uid[:group|gid]>\n"
291
"  		change to this user/group before starting process\n"
293
"  		change to this user/group before starting process\n"
292
"  -u|--user <username>|<uid>    stop processes owned by this user\n"
294
"  -u|--user <username>|<uid>    stop processes owned by this user\n"
Lines 469-474 Link Here
469
		{ "startas",	  1, NULL, 'a'},
471
		{ "startas",	  1, NULL, 'a'},
470
		{ "name",	  1, NULL, 'n'},
472
		{ "name",	  1, NULL, 'n'},
471
		{ "oknodo",	  0, NULL, 'o'},
473
		{ "oknodo",	  0, NULL, 'o'},
474
		{ "gpidfile",	  1, NULL, 'G'},
472
		{ "pidfile",	  1, NULL, 'p'},
475
		{ "pidfile",	  1, NULL, 'p'},
473
		{ "quiet",	  0, NULL, 'q'},
476
		{ "quiet",	  0, NULL, 'q'},
474
		{ "signal",	  1, NULL, 's'},
477
		{ "signal",	  1, NULL, 's'},
Lines 489-495 Link Here
489
	int c;
492
	int c;
490
493
491
	for (;;) {
494
	for (;;) {
492
		c = getopt_long(argc, argv, "HKSV:a:n:op:qr:s:tu:vx:c:N:bmR:g:d:",
495
		c = getopt_long(argc, argv, "HKSV:a:n:oG:p:qr:s:tu:vx:c:N:bmR:g:d:",
493
				longopts, (int *) 0);
496
				longopts, (int *) 0);
494
		if (c == -1)
497
		if (c == -1)
495
			break;
498
			break;
Lines 515-520 Link Here
515
		case 'o':  /* --oknodo */
518
		case 'o':  /* --oknodo */
516
			exitnodo = 0;
519
			exitnodo = 0;
517
			break;
520
			break;
521
		case 'G':
522
			isgrouppidfile = 1; /* set flag to negate PID number */
518
		case 'p':  /* --pidfile <pid-file> */
523
		case 'p':  /* --pidfile <pid-file> */
519
			pidfile = optarg;
524
			pidfile = optarg;
520
			break;
525
			break;

Return to bug 126783