Re: Restart an application



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.

.



Relevant Pages

  • Re: Weird behavior from Kermit 95
    ... >> Every once in a while, I see this happen when I try to exit from a Kermit 95 ... This happens to me with Linux boxes all the time if I have a root session ... the ssh session stays up until those file descriptors get closed. ...
    (comp.protocols.kermit.misc)
  • Re: Restart an application
    ... I have a tcl/tk application that should exit and restart itself. ... The Linux box has very limited input devices, ... I'm searching for a platform ... Just exec yourself and exit. ...
    (comp.lang.tcl)
  • Re: How do I exit from X into the shell?
    ... I am just starting to take my first baby steps into Linux. ... Hmm, do you really want to "exit X", or do you just want to ... start a "command line" window? ... Red Hat 6 is verrrry old. ...
    (comp.os.linux.x)
  • Re: How do I exit from X into the shell?
    ... I am just starting to take my first baby steps into Linux. ... Hmm, do you really want to "exit X", or do you just want to ... start a "command line" window? ... Red Hat 6 is verrrry old. ...
    (comp.os.linux.setup)
  • Re: error cant find libpam.so.0 etc.
    ... from the rescue disk and not all the commands you need are there. ... I''ve been using Linux, and mostly ONLY linux at home (hate windows. ...
    (Fedora)