Re: system()

From: Date: Mon, 19 Feb 2001 18:29:48 +0000
Subject: Re: system()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-40602@lists.php.net to get a copy of this message
On Monday 19 February 2001 21:00, ..s.c.o.t.t.. wrote: > i am not positive about this, but you could try making > the amp process a background process by adding a > " &" to the end of the command line > (at least if you're using *nix) That alone won't help - "nohup" is also needed. What he could do is write a small Perl/C wrapper for amp, which launches the program in the background and returns its process id. Then he can do a $AmpPID = system ("launchamp $Arg"); (the wrapper would have to execute "nohup amp $Args &") and add a 'stop' link <a href="ampstop.php?pid=<?= $AmpPID ?>">Stop</a> And ampstop.php can do a system ("kill -KILL $pid"); > > However, when they click Play, I want the same page to be > > reloaded again, with nothing selected, and their (previous) selection > > to start playing in the background. If they want to change their > > selection, they can go ahead and pick other songs, and click Play > > again - THIS is where the previous instance of the 'amp' program > > should be killed, and a new one started, with the new play list > > queued. And of course, it should also have a Stop button on the page > > somewhere. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) I saw God --------- and she was black.

« previous php.general (#40602) next »