[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]


I've been studying the system bootup mechanism and encountered a problem
with the runsystem script.  I have been attempting to re-write this into
C, because the shell script does not seem to do it's job correctly.  I'm
sure someone will correct me if I'm wrong, and constructive criticism and
advice are always welcome.

/libexec/runsystem is supposed to catch certain signals and then send them
on to runttys.  Runttys has signal handlers set up for SIGLOST, SIGHUP, and
SIGTERM.  So if runsystem catches any of these signals, it should kill -sig
<pid_of_runttys>.  But on my system, this does not occur for SIGTERM.
When I send runttys a SIGTERM, the console becomes flooded with the 
following two messages and the only way out is to kill runsystem itself
from a pty login.  Init then drops me to a shell on the console.

/libexec/runsystem: /libexec/rc: /bin/bash: bad interpreter: (ipc/send)
    invalid port right
/libexec/runsystem: /bin/sh: (ipc/send) invalid port right

Has anyone else seen this problem ?  I have a C version of runsystem 
which _does_ pass the signals on to runttys correctly, and the above
problem seems to vanish.  Still I wonder if the problem is caused by
some other stupid thing that I'm doing.  Time to dig into the Hurd
Hacking Guide.

Comments welcome...

Kevin Bradford

Attachment: pgpfau3MEmn6_.pgp
Description: PGP signature

Reply to: