Permalink
Browse files

kill [id process] when execl fails

  • Loading branch information...
hypatia2 committed Oct 22, 2015
1 parent 3ff3199 commit 425436e912a373b4ab2bba2a7b75188fa51416ed
Showing with 6 additions and 0 deletions.
  1. +4 −0 fruho/main.tcl
  2. +2 −0 fruhod/main.tcl
@@ -2791,7 +2791,11 @@ proc ffread-loop {} {
model save
# execl replaces the calling process image with a new process image.
# This has the effect of running a new program with the process ID of the calling process.
# Note: If you are using execl in a Tk application and it fails, you may not do anything that accesses the X server or you will receive a BadWindow error from the X server. This includes exe-cuting the Tk version of the exit command. We suggest using the following command to abort Tk applications after an execl fail-ure:
# kill [id process]
# On Windows, where the fork command is not available, execl starts a new process and returns the process id.
execl [this-binary]
kill [id process]
}
}
}
@@ -351,7 +351,9 @@ proc upgrade {dir} {
# execl replaces the calling process image with a new process image.
# This has the effect of running a new program with the process ID of the calling process.
# if this does not fail it never returns
# On Windows, where the fork command is not available, execl starts a new process and returns the process id.
execl /usr/local/sbin/fruhod.bin
} on error {e1 e2} {
# restore binaries from the backup path
catch {

0 comments on commit 425436e

Please sign in to comment.