Hello all,
I'm "porting" some shell scripts to run on win32 platforms
(how fun) and have run into a problem. One of the scripts
is a boot-time script which launches a daemon and then checks
to make sure the daemon is running. The daemon prints prints
both to STDOUT and STDERR. The current shell script runs this
daemon through a sub-shell and then into a log file. This is
done to allow log rotation without killing the daemon.
The problem I am having is with actually spawning the daemon.
I have tried fork(), Win32::Process, and pipes to no avail.
It seems that each of these is waiting for the child to
return before exitting.
This child process (daemon) will not return, nor do I want it
to. Also, I can not perform any action (request) which requires
talking w/ the daemon while the parent is still waiting for
the child to return (die).
Any suggestions on how to do this in the win32 environment?
I will supply some code if needed.
Thanks,
Eric