RE: [PHP] Re: How to fire off a unix command WITHOUT waiting for it to return (I want to use &)
| From: | Daevid Vincent | Date: | Sat, 11 Oct 2003 00:47:12 +0000 |
| Subject: | RE: [PHP] Re: How to fire off a unix command WITHOUT waiting for it to return (I want to use &) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-165819@lists.php.net to get a copy of this message | ||
Yeah, that is the 'hack' solution I came up with too. LOL.
I guess I was hoping for something more elegant...
Is there a reason that PHP doesn't handle the & properly? I mean, it seems
as though you'd have to go out of your way to force it NOT to spawn the task
in the background. If PHP was just executing the command in a shell, it
seems that the OS would handle the & for you...
d
> -----Original Message-----
> From: Curt Zirzow [mailto:php-general@zirzow.dyndns.org]
> Sent: Friday, October 10, 2003 4:31 PM
> To: php-general@lists.php.net
> Subject: [PHP] Re: How to fire off a unix command WITHOUT
> waiting for it to return (I want to use &)
>
> On Fri, 10 Oct 2003 16:07:54 -0700, Daevid Vincent
> <daevid@daevid.com>
> wrote:
>
> > How can I cause PHP to fire off a unix program and NOT wait
> for a reply.
> > Basically I want to use the "&" love the unix provides, but
> it seems that
> > exec, passthrough, system and even
all wait for a
> return despite my
> > putting something like exec("/bin/scan &"); or /bin/scan
> > &
> >
> > *sigh*
>
> write simple shell script wrapper that does it for you:
>
> #!/bin/sh
> /bin/scan &
>
>
> Then call the wrapper.
>
>
> HTH, Curt.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>