html - Why hangs the web page after it started a daemon on the underlying server? -


i start/stop daemon process on home server via simple web page.

the html this:

<form action="http://192.168.2.101/cgi-bin/managedaemon.pl" method="post">   <input type="submit" value="start" name="start"/>   <input type="submit" value="stop" name="stop"/> </form> 

the managedaemon.pl this:

#!/usr/bin/perl system("/usr/local/theprog/startserver"); print "content-type:text/html\r\n\r\n"; print "<html>"; ... 

and startserver this:

#!/bin/bash cd /usr/local/theprog ./theprogserver -daemon 

when execute perl script command line, daemon process started , script terminated.
however, when trigger web browser, daemon process started, page hangs until started daemon killed.

please let me know how avoid 'hanging'.

thanks, marton

your daemon not detaching properly, so answer daemonizing contains summary of steps required


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -