Re: Basic question - Starting a background task without waiting for its end.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You can try tacking a "&" at the end to fork the Notepad opening...

It may or may not work depending on a bunch of factors.

Don't be surprised if it "works" and makes your Windows box even more
unstable than it already way, and you get random crashes from this.

Thread-safety within PHP extensions is not guaranteed, and don't even
ask about Notepad and thread safety...

Note that it could work fine for YEARS and then you un-comment an
un-threadsafe extension in php.ini and Bam! the whole thing starts
crashing at random points for no obvious reason.

On Sun, December 31, 2006 10:18 am, Michel wrote:
>
> I (very simply) try to open a "notepad" on a simple text file in a
> simplistic PHP script, and would like to go on and display the next
> page
> without waiting for this notepad to be shut.
>
> After various attempts, I have used an :
>
> exec ('bash -c cmd /C start /MAX notepad "my_file" > NUL');
>
> ... but it still wait for the shutting of the notepad ..!
>
> Could anybody help me ?
>
> For clarification :
> 1) I use this script on a machine which is in the same time "server"
> and
> "client", which gives "meaning" to this operation.
> 2) I use "bash -c" because I have the cygwin platform which can easily
> initiate tasks in background, but it could be suppressed, because it
> "de
> facto" changes nothing...
>
> Thank's for help.
>
> Michel.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux