detach-from-terminal
"Tyler Palmer" <[email protected]> Thu, 9 Dec 2004 14:22:07 -0600
| Newsgroups | gmane.lisp.allegro |
|---|---|
| Message-ID | <[email protected]> |
Hi All.
I've been trying to play around with detach-from-terminal on linux, but
I think I'm not quite doing things correctly. I've got a web app using
AServe that starts an instance of AServe, intializes some variables, and
then I want it to become a daemon running in the background.
I use generate-application to build my app.
I then kick it off with ./TestApp &
It initializes some vars, and then does the following:
(net.aserve:start :port port
:listeners listeners
:keep-alive nil)
(publish-web-pages)
(if (excl.osi:detach-from-terminal-supported-p)
(excl.osi:detach-from-terminal)
(format t user::*C$daemonize-error-msg*))
(tpl:top-level-read-eval-print-loop)
Things go downhill from there. I can't access the web front-end of my
app and when I check netstat on the machine, AServe is no longer
listening for connections on "port".
The app runs fine if I don't utilize detach-from-terminal.
I've done some web searching and documentation reading, but my efforts
have so far been fairly fruitless.
Any suggestions or pointers to examples/tutorials of running as a daemon
on unix/linux?
==================================================================
Tyler Palmer Software Developer, Cyntergy Technology, LLC
[email protected] (918)877-6000 ext. 366
GPG Fingerprint: B3E9 D77B 64D7 1783 BA91 036D E4AC 18D0 DB19 4D95
==================================================================