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
Post a Comment