diff options
author | Todd T. Fries <todd@fries.net> | 2012-01-04 12:10:15 -0600 |
---|---|---|
committer | Todd T. Fries <todd@fries.net> | 2012-01-04 12:10:15 -0600 |
commit | 3a9aa0d96d331722053de3f3e73a7b081c34f0e7 (patch) | |
tree | 85db5e3e6379ca6cab0a09bbd8feb5f484c9cc28 | |
parent | 2a45362810ed76e558cd534caa187f7a893fba4e (diff) | |
download | xombrero-3a9aa0d96d331722053de3f3e73a7b081c34f0e7.tar.gz |
comment out WIFEXITED(status) to make it clear this is not useful
if this is uncommented, we get a bogus status that tells us to unlink the file the instant system() is inplay in the child. So it is a race with this uncommented. Adding a "sleep 1" in a script to call the editor makes this 100% reproducable. With this fix externaleditor works great for me
-rw-r--r-- | externaleditor.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/externaleditor.c b/externaleditor.c index 665291c..88382e7 100644 --- a/externaleditor.c +++ b/externaleditor.c @@ -118,7 +118,7 @@ open_external_editor_cb (gpointer data) /* Check if child has terminated */ rv = waitpid(args->child_pid, &status, WNOHANG); - if (rv == -1 || WIFEXITED(status)) { + if (rv == -1 /* || WIFEXITED(status) */) { /* Delete the file */ unlink(args->path); |