diff options
author | Eric Wong <e@80x24.org> | 2015-01-23 08:48:34 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-01-23 08:48:34 +0000 |
commit | ddf4460bb8233d5d8ac9015b1ef34316d9681e23 (patch) | |
tree | e37dcf1e60ffb43d2e89cf543a6c11ea4dd8cb91 /bin/dtas-sourceedit | |
parent | 9bf21db1e0ad815187b8c93ef985ef591a606645 (diff) | |
download | dtas-ddf4460bb8233d5d8ac9015b1ef34316d9681e23.tar.gz |
Users may hit Ctrl-Z to stop their editor during editing and trigger SICHLD, do not waitpid2 indefinitely in that case. This prevents missed "source ed" calls for inotify users.
Diffstat (limited to 'bin/dtas-sourceedit')
-rwxr-xr-x | bin/dtas-sourceedit | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/dtas-sourceedit b/bin/dtas-sourceedit index 646058f..bf9e829 100755 --- a/bin/dtas-sourceedit +++ b/bin/dtas-sourceedit @@ -76,7 +76,8 @@ else r[0].each do |io| case io when sev - _, status = Process.waitpid2(pid) + _, status = Process.waitpid2(pid, Process::WNOHANG) + status or next status.success? or abort "#{cmd} failed: #{status.inspect}" do_update.call exit |