Re: [PHP-GTK] Reload/restart php-gtk program
by Bob Majdak Jr other posts by this author
Aug 8 2007 9:24AM messages near this date
Re: [PHP-GTK] Reload/restart php-gtk program
|
Re: [PHP-GTK] Reload/restart php-gtk program
Not that I did extensive testing, but I think it will be fine. The applications I have using
it have
worked as expected without any reports of misbehaving. The only thing I do not know is how t
o
translate '&> /dev/null &' to something Windows knows.
- bob.
Bernard Fouch wrote:
> Oops, I did not see the '&' in the system() call. That means that the
> process is launched in background while the parent process dies, hence
> only one PHP stays in memory.
>
> However depending on your setup you may run into problems: the child
> process may get a SIGHUP for instance, once its parent dies (depending
> how the initial process was launched)
>
> Regards,
>
> Bernard
>
> Peter Smith wrote:
> > 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
> >>
> >>
> >>
> >>
> >
> >
>
--
PHP-GTK General Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thread:
Peter Smith
sebastianmarconi
Adrian Snyman
Marc Quinton
Elizabeth Smith
Bob Majdak Jr
Peter Smith
Bernard Fouche
Bob Majdak Jr
Bernard Fouche
|