SPUG: Creating a NON zombie daemon
ced at carios2.ca.boeing.com
ced at carios2.ca.boeing.com
Mon Apr 17 21:15:15 CDT 2000
> I have a Java application that will run like a daemon for a Perl program...
> but How do I start the daemon up and Only have one PID associated with it?
> I have tried like this but I get two process?
> <CODE>
That's because system("java...") forks.
> system("java myClass.class");
Perhaps this is what you want:
exec "/path/to/java", "myClass.class" or die "exec: $!";
> I would like to be able to something similar in a init script but it wont
> work??? any ideas? It seems to function but nothing ever shows up in a "ps
> -ef"
Could the Java program be exiting prematurely... ?
Rgds,
--
Charles DeRykus
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe
Email to majordomo at pm.org: "action" spug-list your_address
More information about the spug-list
mailing list