Re: Restart an application
- From: "Rasmus Debitsch" <Debitsch@xxxxxxxxxxx>
- Date: Wed, 31 Oct 2007 18:44:09 +0100
Thanks,
works like a charm. My final solution is
eval exec [info nameofexecutable] [file normalize [info script]] $args &
and an
after 1000
at the very beginning of the program. This makes sure that the program can
release an open COM port before the new one tries to grab it.
Rasmus
"slebetman@xxxxxxxxx" <slebetman@xxxxxxxxx> schrieb im Newsbeitrag
news:1193785345.880144.201450@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Oct 31, 2:03 am, "Rasmus Debitsch" <Debit...@xxxxxxxxxxx> wrote:
Hello,
I have a tcl/tk application that should exit and restart itself. This is
some kind of "reset" for the program. The application runs on Linux and
Windows. The Linux box has very limited input devices, therefore I must
invoke the restart from my running application itself. After stopping my
application there is no chance for the user to interact with the system
any
more - he can reboot only.
Is there a known solution for this problem? I'm searching for a platform
independent solution. If no such solution exists, an "if
{$tcl_plaform(platform) == ..." based solution is fine too.
Just exec yourself and exit. Works on all platforms I tried it on. Any
problem with that?
If this is a script then:
exec [info nameofexecutable] [info script]
exit
If this is a wrapped app (freewrap or starpack) then just:
exec [info nameofexecutable]
exit
Pass command line arguments as necessary.
.
- References:
- Restart an application
- From: Rasmus Debitsch
- Re: Restart an application
- From: slebetman@xxxxxxxxx
- Restart an application
- Prev by Date: Re: Controlling a windows program
- Next by Date: Re: Expect log_file Issue
- Previous by thread: Re: Restart an application
- Next by thread: Tcl-URL! - weekly Tcl news and links (Oct 30)
- Index(es):
Relevant Pages
|