Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.bugs.dist > #814999
| From | Ian Jackson <ijackson@chiark.greenend.org.uk> |
|---|---|
| Newsgroups | linux.debian.bugs.dist |
| Subject | Bug#858555: chiark-utils-bin: [patch] add timeout option to with-lock-ex |
| Date | 2017-03-23 19:40 +0100 |
| Message-ID | <tofOp-6a9-13@gated-at.bofh.it> (permalink) |
| References | <toa2m-28N-23@gated-at.bofh.it> <tocGS-3Wl-9@gated-at.bofh.it> <tocGS-3Wl-7@gated-at.bofh.it> <toeIG-5py-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Matthew Vernon writes ("Bug#858555: chiark-utils-bin: [patch] add timeout option to with-lock-ex"):
> Revised patch attached. My commit message:
Thanks.
We (Mark and I) had a long discussion on irc, including after you
left, about signal handling. Our conclusion is that you need to do:
sigprocmask(SIG_BLOCK); sigaction; setitimer; ... other setup ...;
for (;;) {
stuff
sigprocmask(SIG_UNBLOCK);
r = fcntl;
sigprocmask(SIG_BLOCK);
do things with r and errno
stuff
}
setitmer(cancel)
sigprocmask(SIG_SETMASK);
/* might still get a timeout signal handler entry here! */
sigaction(SIG_DFL);
exec;
And, as you suggested, all the if (alarmed) stuff then moved into the
signal handler.
Also, to make life extra annoying, I'd like this program not to mess
with the signals at all unless it has to, so all of this should be
conditional on secs.
Ian.
Back to linux.debian.bugs.dist | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Bug#858555: chiark-utils-bin: [patch] add timeout option to with-lock-ex Matthew Vernon <matthew@debian.org> - 2017-03-23 13:30 +0100
Bug#858555: chiark-utils-bin: [patch] add timeout option to with-lock-ex Ian Jackson <ijackson@chiark.greenend.org.uk> - 2017-03-23 16:20 +0100
Bug#858555: chiark-utils-bin: [patch] add timeout option to with-lock-ex Ian Jackson <ijackson@chiark.greenend.org.uk> - 2017-03-23 16:20 +0100
Bug#858555: chiark-utils-bin: [patch] add timeout option to with-lock-ex Matthew Vernon <matthew@debian.org> - 2017-03-23 18:30 +0100
Bug#858555: chiark-utils-bin: [patch] add timeout option to with-lock-ex Ian Jackson <ijackson@chiark.greenend.org.uk> - 2017-03-23 19:40 +0100
Bug#858555: chiark-utils-bin: [patch] add timeout option to with-lock-ex Matthew Vernon <matthewv@chiark.greenend.org.uk> - 2017-03-24 14:40 +0100
Bug#858555: chiark-utils-bin: [patch] add timeout option to with-lock-ex Ian Jackson <ijackson@chiark.greenend.org.uk> - 2017-03-23 17:00 +0100
Bug#858555: chiark-utils-bin: [patch] add timeout option to with-lock-ex Matthew Vernon <matthew@debian.org> - 2017-03-23 17:10 +0100
csiph-web