Re: [PHP-GTK] Reload/restart php-gtk program

[email protected] (Peter Smith)
Newsgroups php.gtk.general
Message-ID <[email protected]>
Yes, your reply was exactly what I was looking for.
It works like a charm.
Bernard said "system() will suspend the current PHP process until the
program launched
is finished: you'll have two PHP-CLI running in the system. "
This was what I was afraid would happen but it turns out that the second
process effectively replaces the first.


bob majdak jr wrote:
> 
> 
> //. this recompiles the exact command used for launch, flags options and
> all.
> $argstr = implode(" ",$_SERVER['argv']);
> 
> $myMainWindow->hide();
> $myMainWindow = null;
> 
> Gtk::main_quit();
> 
> //. all output must be silenced, and task must be
> //. backgrounded, or else system will not return
> //. and nothing happens to the main program.
> system("{$argstr} &> /dev/null &");
> exit(0);
> 
> //. bob
> 
> ?>
> 
> Peter Smith wrote:
>> I would like to reload and restart a php-gtk program after the program
>> has
>> downloaded an updated version of itself. I visualise a dialog informing
>> the
>> user that an updated version has been installed and inviting him to click
>> on
>> a button to restart with the updated version of the program.
>> How would you do this? I have a feeling the answer is painfully obvious
>> but
>> I can't see it.
>> Peter.
> 
> -- 
> PHP-GTK General Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Reload-restart-php-gtk-program-tf4232624.html#a12051980
Sent from the Php - GTK - General mailing list archive at Nabble.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.