7d24d44001
from inadvertently shut down OpenBSD and bump the package name.
28 lines
885 B
Plaintext
28 lines
885 B
Plaintext
$OpenBSD: patch-scheduler_main_c,v 1.1 2005/10/09 10:29:47 mbalmer Exp $
|
|
--- scheduler/main.c.orig Mon Jan 3 20:29:59 2005
|
|
+++ scheduler/main.c Sun Oct 9 12:12:56 2005
|
|
@@ -91,6 +91,7 @@ main(int argc, /* I - Number of comm
|
|
char *argv[]) /* I - Command-line arguments */
|
|
{
|
|
int i; /* Looping var */
|
|
+ pid_t pidi;
|
|
char *opt; /* Option character */
|
|
int fg; /* Run in the foreground */
|
|
int fds; /* Number of ready descriptors select returns */
|
|
@@ -408,8 +409,13 @@ main(int argc, /* I - Number of comm
|
|
* we are up and running...
|
|
*/
|
|
|
|
- if (!fg)
|
|
- kill(getppid(), SIGUSR1);
|
|
+ if (!fg) {
|
|
+ pidi = getppid();
|
|
+ if (pidi != 1)
|
|
+ kill(pidi, SIGUSR1);
|
|
+ else
|
|
+ syslog(LOG_NOTICE, "parent process is INIT!\n");
|
|
+ }
|
|
|
|
/*
|
|
* If the administrator has configured the server to run as an unpriviledged
|