Re: [PHP] Asynchronous PHP Execution

2008-07-06 Thread Richard Heyes
Waynn Lue wrote: and exec/shell (but that doesn't seem to be asynchronous), but neither seems optimal. It can be if you redirect the output streams and put an ampersand after it: /dev/null 2>/dev/null &'); echo 'Script ended'; ?> This tiny sample should end immediately, and the sleep comm

Re: [PHP] Asynchronous PHP Execution

2008-07-06 Thread Waynn Lue
On Sat, Jul 5, 2008 at 12:28 PM, Daniel Brown <[EMAIL PROTECTED]> wrote: > On Sat, Jul 5, 2008 at 6:01 AM, Waynn Lue <[EMAIL PROTECTED]> wrote: > > I have a system where a user clicks on a button which causes rows to > > be inserted in to the database. I'd also like to run some lengthier > > post

Re: [PHP] Asynchronous PHP Execution

2008-07-06 Thread Waynn Lue
> > > and exec/shell (but that > >> doesn't seem to be asynchronous), but neither seems optimal. >> > > It can be if you redirect the output streams and put an ampersand after it: > > exec('sleep 5 > /dev/null 2>/dev/null &'); >echo 'Script ended'; > ?> > > This tiny sample should end immed

Re: [PHP] Asynchronous PHP Execution

2008-07-05 Thread Daniel Brown
On Sat, Jul 5, 2008 at 6:01 AM, Waynn Lue <[EMAIL PROTECTED]> wrote: > I have a system where a user clicks on a button which causes rows to > be inserted in to the database. I'd also like to run some lengthier > post-processing on those rows, but don't want to put it in the > critical path of the

Re: [PHP] Asynchronous PHP Execution

2008-07-05 Thread Shawn McKenzie
Richard Heyes wrote: Also: exec('sleep 5 >& /dev/null &'); Maybe? Two ampersands you mean? Why - what does it do? You're also not redirecting STDERR. I can't always remember because I think some things that are in c shell but aren't available in bourne have been incorpoated into bash.

Re: [PHP] Asynchronous PHP Execution

2008-07-05 Thread Shawn McKenzie
Richard Heyes wrote: Also: exec('sleep 5 >& /dev/null &'); Maybe? Two ampersands you mean? Why - what does it do? You're also not redirecting STDERR. My bad. I was trying to shorten your command. >& redirects stdout and stderr, unfortunately in c shell though. -Shawn -- PHP General

Re: [PHP] Asynchronous PHP Execution

2008-07-05 Thread Richard Heyes
Also: exec('sleep 5 >& /dev/null &'); Maybe? Two ampersands you mean? Why - what does it do? You're also not redirecting STDERR. -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Asynchronous PHP Execution

2008-07-05 Thread Shawn McKenzie
Richard Heyes wrote: > and exec/shell (but that doesn't seem to be asynchronous), but neither seems optimal. It can be if you redirect the output streams and put an ampersand after it: /dev/null 2>/dev/null &'); echo 'Script ended'; ?> This tiny sample should end immediately, and the s

Re: [PHP] Asynchronous PHP Execution

2008-07-05 Thread Richard Heyes
> and exec/shell (but that doesn't seem to be asynchronous), but neither seems optimal. It can be if you redirect the output streams and put an ampersand after it: /dev/null 2>/dev/null &'); echo 'Script ended'; ?> This tiny sample should end immediately, and the sleep command should ru