Re: Using system() at Web Host
- Posted by Andy Serpa <ac at onehorseshy.com> Oct 12, 2005
- 466 views
cklester wrote: > > I'm using system() to run a program (mailer.exu) when a link on my web page is > clicked. The thing is, the program I run will be doing something like this: > > }}} <eucode> > while TRUE do > -- do some stuff > sleep(300) -- sleep on it > if time_to_exit() then > exit > end if > end while > </eucode> {{{ > > So it should stay active once the web server is done with the system() call, > but it seems to hang, waiting for system() to return with something. I know > that should not be the case with system(). > > Any hints on how to track this down? It seems the mailer.exu program and the > web server are intricately linked when they should not be. > > -=ck > "Programming in a state of EUPHORIA." > <a > href="http://www.cklester.com/euphoria/">http://www.cklester.com/euphoria/</a> > Both system() and system_exec() hang waiting for the call to return (i.e. your program to exit). At least on Windows they do, and it sounds like your Linux server acts the same way. I don't know the API to get around it on Linux, but I'm sure someone does?