Mailing List Archive

HP-UX 10.20 and nohup (qmail-send disappears)
It seems that you must use "nohup" on HP-UX 10.20 machines when you
start qmail in the system startup procedures or it will start and then
disappear fairly quickly after you boot the system. I'm using:

nohup env - PATH="/var/qmail/bin:$PATH" qmail-start splogger \
qmail >/dev/null 2>&1 &

So far I haven't needed this on any other type machine.

Should this be added to the FAQ (or am I just wrong about it)? Even
better, should qmail-start automatically handle the problem?

Jim
Re: HP-UX 10.20 and nohup (qmail-send disappears) [ In reply to ]
[ Jim Simmons <s4i@sws6.ctd.ornl.gov> 1997-3 -12 12:57 -0000 ]
|---
| It seems that you must use "nohup" on HP-UX 10.20 machines when you
| start qmail in the system startup procedures or it will start and then
| disappear fairly quickly after you boot the system. I'm using:
|
| nohup env - PATH="/var/qmail/bin:$PATH" qmail-start splogger \
| qmail >/dev/null 2>&1 &
|
| So far I haven't needed this on any other type machine.

Uh, yes, this is a HP-UX 10.x problem all right. The explanation is as
follows, as explained to me by Bert Gijsbers last November:

* The situation on HP-UX 10.X is that at bootup the
* system starts the rc scripts with a terminal which
* is closed when the scripts are done.

And when the pty is closed, all programs attached to that pty get a HUP.

My solution is to run a small program that dissociates itself from the
controlling tty and spawns qmail-start. The program is called watch (it
also writes the pid of the subprocess to a file, and hangs around to
remove the file when the subprocess finishes) and may be picked up, at no
charge and no warranty, at
<URL:http://www.math.ntnu.no/~hanche/qmail/watch.html>.

| Should this be added to the FAQ (or am I just wrong about it)? Even
| better, should qmail-start automatically handle the problem?

It has been my impression that Dan does not want his daemons to put
themselves in the background because that makes them hard to debug. Also,
it is more in accordance with the modular nature of qmail to let a
separate program handle the tricky business of putting itself properly in
the background. But yes, it should definitely be in the FAQ.

- Harald