You are here: Re: How can I run shell command without getting return? « PHP Programming Language « IT news, forums, messages
Re: How can I run shell command without getting return?

Posted by David Haynes on 03/09/06 05:04

¹é¿ø¼® wrote:
> Hello, everybody.
>
> I want to call any shell command from php script using shell_exec(). The
> problem is that the next line of the php script would not be run until a few
> minutes after running the shell command.
> I found the shell command couldn't be run at background mode. It seemed that
> the shell_exec() function waits a return from the command. Because the
> command doesn't return, the shell_exec() waits until timeout reached. Using
> the '&' at the end of the command doesn't work expected.
> So I want to know how can I run any non-background mode shell command from
> php script without waiting return.
> I'll look forward to any answer.
> Thanks in advance.
>
>
If nothing else, you could probably do a shell wrapper to background it.
e.g.

#!/bin/bash
nohup foo &

-david-

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация