Hi,
There is a bug in CUPS that causes OpenBSD in some cases
to shutdown. You can do this by starting cupsd. In my box
the parallel-command takes a while, in that time break the
process with control-c and wait to see couple of blue lines
in your console :)
These outputs are with the patch below.
`which cupsd`
-+= 00001 root /sbin/init
|-+= 03767 root /usr/sbin/sshd
| |-+= 04969 root sshd: [EMAIL PROTECTED] (sshd)
| | \-+= 04871 iku -ksh (ksh)
| | \-+= 01317 root -ksh (ksh)
| | \-+= 29188 root /usr/local/sbin/cupsd
| | \-+= 03678 root /usr/local/sbin/cupsd
| | \-+- 20169 root sh -c sh
| | \--- 00278 root /usr/local/libexec/cups/backend/parallel
^C
-+= 00001 root /sbin/init
|-+= 03678 root /usr/local/sbin/cupsd
| \-+- 20169 root sh -c sh
| \--- 00278 root /usr/local/libexec/cups/backend/parallel
some time passes
-+= 00001 root /sbin/init
|--= 03678 root /usr/local/sbin/cupsd
from the manual of init(8) in OpenBSD:
init will terminate multi-user operations, kill all getty's, run
/etc/rc.shutdown, and halt the machine if user-defined signal 1 (USR1) is
received.
I simulated the situation in Linux causing the exact same malfunction:
[EMAIL PROTECTED]:/usr/lib/cups/backend# cat parallel
#!/bin/sh
sleep 10
exec parallel.real
In Linux this isn't so nasty because its init does other thing when
it receives SIGUSR1.
Here's a patch I made so I can debug the situation and prevent
INIT being killed:
--- scheduler/main.c Mon Jan 3 21:29:59 2005
+++ scheduler/main.c.orig Sun Aug 21 21:30:36 2005
@@ -91,6 +91,7 @@
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,14 @@
* 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 ID is INIT!\n");
+}
/*
* If the administrator has configured the server to run as an unpriviledged
This message is for information purposes, this should be fixed in CUPS
and I have mailed them about this.
Sincerely,
Antti Harri