Discussion:
runsvdir and shutdown
George Georgalis
2006-07-31 15:40:10 UTC
Permalink
I'm narrowing down a problem that I think may be related to
shutdown and improper stopping of runsvdir and services.

Presumably the correct way is to "sv d" all the services and when
each one stops "sv d" the corresponding log process, and finally
kill the runsvdir daemon. Then proceed with regular shutdown tasks.

Is there a prescribed method or someone's handy script for a
runsvdir shutdown?

// George
--
George Georgalis, systems architect, administrator <IXOYE><
Alex Efros
2006-07-31 21:14:20 UTC
Permalink
Hi!
Post by George Georgalis
Is there a prescribed method or someone's handy script for a
runsvdir shutdown?
Usual shutdown sequence include 'killall5 -15' command which send TERM to
all processes (including runsv and runsvdir). After this command I've
added 'sv force-stop /var/service/*' and that's enough for correct
shutdown AFAIK.
--
WBR, Alex.
George Georgalis
2006-08-03 19:50:41 UTC
Permalink
Post by Alex Efros
Post by George Georgalis
Is there a prescribed method or someone's handy script for a
runsvdir shutdown?
Usual shutdown sequence include 'killall5 -15' command which send TERM to
all processes (including runsv and runsvdir). After this command I've
added 'sv force-stop /var/service/*' and that's enough for correct
shutdown AFAIK.
okay, sounds good. I put '/usr/local/bin/sv force-stop /var/service/*'
in /etc/rc.shutdown (before rcorder is run) for netbsd -- and learned
'shutdown' is better than 'reboot, poweroff, halt'

BTW - why does 'sv d' send the CONT signal after TERM?

// George
--
George Georgalis, systems architect, administrator <IXOYE><
Paul Jarc
2006-08-03 19:53:19 UTC
Permalink
Post by George Georgalis
BTW - why does 'sv d' send the CONT signal after TERM?
If a process is stopped from SIGSTOP or SIGTSTP, then SIGTERM will
only be queued. The process won't exit (or call its signal handler)
until it is continued with SIGCONT.


paul

Loading...