~mdw
/
misc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
6365546
)
locking.c: Reset alarm state before invoking the target command.
author
Mark Wooding
<mdw@distorted.org.uk>
Mon, 31 May 2010 17:01:56 +0000
(18:01 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Mon, 31 May 2010 17:01:56 +0000
(18:01 +0100)
There's nothing worse than grabbing a lock, trying to do something, and
then being killed by an alarm clock midway through.
Well, there are probably are worse things, but this commit message
isn't the right place to list them.
locking.c
patch
|
blob
|
blame
|
history
diff --git
a/locking.c
b/locking.c
index
f486ea4
..
8931dbd
100644
(file)
--- a/
locking.c
+++ b/
locking.c
@@
-224,7
+224,9
@@
doneopts:
errno = 0;
}
signal(SIGALRM, oalrm);
- if (ot) {
+ if (!ot)
+ alarm(0);
+ else {
nt = time(0) - nt;
if (nt > ot)
raise(SIGALRM);