Comment 2 for bug 264711

Revision history for this message
Jeff Oliver (jeffrey-oliver) wrote : Re: expect fork/daemon do not work as expected

I wrote a simple job file for xinetd.

# xinetd - on-demand internet services
#

start on started network
stop on stopping network

expect fork

exec /usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid

xinetd ends up forking, and from what I can tell, I can't prevent it. when attempting to start it i get:

2008-10-09T02:38:23.103593+00:00 fs03 init: xinetd goal changed from stop to start
2008-10-09T02:38:23.103593+00:00 fs03 init: xinetd state changed from waiting to starting
2008-10-09T02:38:23.103593+00:00 fs03 init: Handling starting event
2008-10-09T02:38:23.103593+00:00 fs03 init: xinetd state changed from starting to pre-start
2008-10-09T02:38:23.104057+00:00 fs03 init: xinetd state changed from pre-start to spawned
2008-10-09T02:38:23.104347+00:00 fs03 init: xinetd main process (18133)
2008-10-09T02:38:23.104481+00:00 fs03 init: xinetd main process (18133) killed by TRAP signal
2008-10-09T02:38:23.105130+00:00 fs03 init: xinetd goal changed from start to stop
2008-10-09T02:38:23.105234+00:00 fs03 init: xinetd state changed from spawned to stopping
2008-10-09T02:38:23.105450+00:00 fs03 init: Handling stopping event
2008-10-09T02:38:23.105642+00:00 fs03 init: xinetd state changed from stopping to killed
2008-10-09T02:38:23.105680+00:00 fs03 init: xinetd state changed from killed to post-stop
2008-10-09T02:38:23.105680+00:00 fs03 init: xinetd state changed from post-stop to waiting
2008-10-09T02:38:23.106179+00:00 fs03 init: Handling stopped event

Which is all fine and good, except that the process was killed by SIGTRAP. It's almost like a signal handler is not installed like it ought to be.