Re: [PHP-GTK] Reload/restart php-gtk program
[email protected] (Bob Majdak Jr)
| Newsgroups | php.gtk.general |
|---|---|
| Organization | KateOS |
| Message-ID | <[email protected]> |
-------- Original Message -------- Subject: Re: [PHP-GTK] Reload/restart php-gtk program Date: Tue, 07 Aug 2007 19:41:26 -0400 From: Bob Majdak Jr <[email protected]> Organization: KateOS To: Peter Smith <[email protected]> References: <[email protected]> I lack Windows command line structure knowledge, so if you need that perhaps someone can translate this. But this is how I have been doing it in Linux, if the user does not have the required permissions (admin) to run the program, just causing a 'restart' of the application. <?php //. 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.