help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Process restart hangs, workaround.


From: Russell Adams
Subject: Process restart hangs, workaround.
Date: Wed, 24 Sep 2003 11:16:25 -0500
User-agent: Mutt/1.4i

I've been experiencing the process restart hang under Gentoo linux for
all of the init scripts, and have found a novel workaround I thought
I'd share in case someone else has the problem.

Past posts have indicated that the daemon itself is at fault, and if
the useshell options weren't helping, the only way to correct the
issue was to fix the daemon. 

Past post:
http://www.geocrawler.com/archives/3/374/2000/1/0/3068970/

The workaround involves explicitly using a shell, and then forcing the
shell to exit regardless of open files left by the daemon.

Here's a sample entry for syslog-ng under Gentoo:

processes:
   "/usr/sbin/syslog-ng"
      restart "/etc/init.d/syslog-ng zap start 2<&-"
      matches=1
      useshell=true

The key is "2<&-" which forces stderr to close, freeing the shell to
exit. A more severe option is to use "0<&- 1<&- 2<&-" forcing stdin,
stdout, and stderr to close. Closing stdin is sufficient to kill the
shell under normal circumstances.

Link to Gentoo Forums posts:
http://forums.gentoo.org/viewtopic.php?t=87904&highlight=

Enjoy!

Russell




reply via email to

[Prev in Thread] Current Thread [Next in Thread]