wrote:
> hi,
>
> I came across a problem which is when i run the server program without
> the daemon code, calling another program by `perl second.pl` is just
> fine. However, when i put the server to be in daemon, calling to
> another program by using `perl <something>.pl` is not working anymore.
> What is the cause and how to solve?
>
> Thank you very much.
>
Making a daemon occasionally involves changing the working directory
(from the Linux manpage of the daemon() function):
"Unless the argument nochdir is non-zero, daemon() changes the current
working directory to the root ("/")."
Check where you are.
--
Josef Möllers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett