Re: ldirectord fork a new daemon?
Horms <[email protected]>
| Newsgroups | gmane.linux.highavailability.ultramonkey |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Aug 30, 2005 at 08:57:33AM +0000, Eric Chan wrote:
> Hi,
>
> We have modified the /usr/sbin/ldirectord perl script. The aim is to add a
> check_process function using rsh to check for existence of remote process.
>
> For the ldirectord, there is the below procedure
>
> sub ld_daemon
>
> This seems to cause our system call to rsh to fork a new daemon.
>
> system("rsh 192.168.0.111 ps -ef|grep java");
>
> As a result, there are many time_wait for the port 514 (rsh listen port) on the
> ldirectord side. [netstat -na|grep 514 show many time_wait]
>
> Is there any ways to solve this problem? We don't want to have so much
> time_wait. Thx.
>
> Best regards,
ld_deaemon() is run as part of ldirectord's initilalisation sequence
to detatch it from the terminal, and do other things that are
appropirate for a deamon. Once ldirectord is up and running,
it should not have any effect on child processes, unless
they expect to be attached to a terminal (perhaps rsh does).
On a related note, if you want to call system() from inside
ldirectord I recommend using system_wrapper()
--
Horms
--
Ultra Monkey - http://www.ultramonkey.org/
To UNSUBSCRIBE, email to [email protected], with a body:
unsubscribe ultramonkey-users [email protected]
where "[email protected]" is YOUR email address.