srinivask has asked for the wisdom of the Perl Monks concerning the following question:

Hello iam a learner in perl. I am trying to create an application which has three java server threads which have to be run as daemon threads and stopped if required. The problem is iam trying to interface the start and stop of daemon threads using a web page with buttons which state the status of the server threads. Using perl which iam calling the daemon thread my handle goes to the java thread and does not return back -- how should i handle this to get back the status and show the same page to the end user informing through the web page that the server has been started and if he feels like he can stop by clicking on the stop button. i would be greatful if any body can help with an example and with sample code. Srinivas

Replies are listed 'Best First'.
Re: Running daemon threads
by slayven (Pilgrim) on Oct 17, 2001 at 13:15 UTC
    i'm not quite sure if i understood your question correctly. when you're looking for a method to launch and control another program within a perl script the easiest way would be to fork and spawn a child process which can be controlled by the parent process.