ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-gtk-general
php-gtk-general
Re: [PHP-GTK] Reload/restart php-gtk program
by Bob Majdak Jr other posts by this author
Aug 7 2007 4:52PM messages near this date
Re: [PHP-GTK] Reload/restart php-gtk program | Re: [PHP-GTK] Reload/restart php-gtk program
-------- Original Message --------
Subject: Re: [PHP-GTK] Reload/restart php-gtk program
Date: Tue, 07 Aug 2007 19:41:26 -0400
From: Bob Majdak Jr <bob@[...].org> 
Organization: KateOS
To: Peter Smith <smithpdo@[...].com> 
References: <12042083.post@[...].com> 

I lack Windows command line structure knowledge, so if you need that perhaps someone can tra
nslate
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.

-- 
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved