Hi Antoine, Antoine Jacoutot wrote on Thu, Jul 28, 2011 at 10:22:56AM +0200: > On Thu, 28 Jul 2011, David Coppa wrote: >> On Thu, 28 Jul 2011, Robert Nagy wrote: >>> It seems that SIGTERM is not enough for mountd, according to the code >>> SIGTERM only sends a RPCMNT_UMNTALL broadcast to the clients. >>> So I think what we should do in this case is to first send a SIGTERM >>> to mountd, and then SIGKILL it in rc_stop().
>> Something like this? the sleep is just paranoia, don't know >> if it's useful... > Why not use rc_post for SIGKILL? Because rc_do rc_wait stop || rc_exit failed is called before rc_post. When the daemon refuses to die, the post-mortem action will not even be attempted. >> Index: mountd >> =================================================================== >> RCS file: /cvs/src/etc/rc.d/mountd,v >> retrieving revision 1.1 >> diff -u -p -r1.1 mountd >> --- mountd 8 Jul 2011 00:54:04 -0000 1.1 >> +++ mountd 28 Jul 2011 08:15:37 -0000 >> @@ -6,4 +6,10 @@ daemon="/sbin/mountd" >> >> . /etc/rc.d/rc.subr >> >> +rc_stop() { >> + pkill -f "^${pexp}" >> + sleep 1 >> + pkill -9 -f "^${pexp}" >> +} >> + >> rc_cmd $1 I worry more that fixed-time sleeps often prove to short, not so much that it might be useless, but i don't see a better option right now. Sorry, I can't test or look in more detail right now. Yours, Ingo