
(Sorry for the shot quoting+references, but only Brians reply to the mail I want to reply to made it to my mailbox ...)
On May 28, 2014 5:48 PM, <reg14@rambler.ru> wrote:
stop is successful, but pidfile is not removed. Then it becomes impossible to determine whether stunnel is running or not.
(As far as the GNU version of "kill" goes, a "kill -0 $PID" will tell you whether a process with that PID still exists; I've seen that used in some init.d scripts. Not foolproof, of course.)
I think that truncating pidfile in an init.d script is more reliable sign that service is stoped as compared with deleting pidfile. init.d sctipts are probably the more appropriate place to manipulate pidfile.
Heavens *no*! init.d etc. scripts that fail to actually remove the process they're supposed to stop exist. Also, terminating processes *without* going through "the appropriate" script is way too easy - from a typo in a "kill" command to ambiguities like "/etc/init.d/httpd vs. apachectl" to genuine abortion (SIGSEGV etc.) to things like the oomkiller running amok on a cluster we're setting up these days. Regards, J. Bern -- *NEU* - NEC IT-Infrastruktur-Produkte im <http://www.linworks-shop.de/>: Server--Storage--Virtualisierung--Management SW--Passion for Performance Jochen Bern, Systemingenieur --- LINworks GmbH <http://www.LINworks.de/> Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt PGP (1024D/4096g) FP = D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C27 Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202 Unternehmenssitz Weiterstadt, Geschäftsführer Metin Dogan, Oliver Michel