diff options
| author | christos <christos@NetBSD.org> | 2003-10-09 13:43:00 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2003-10-09 13:43:00 +0000 |
| commit | 77b4aabadde3888209ad0cc5ce982e6e48ea735b (patch) | |
| tree | 854d11e5e5d2befa3f818ceb71393daefd4cd6b0 /gnu | |
| parent | f2aa877507fa02cac111d7b94fa3e566098b560c (diff) | |
Avoid re-entry in the cleanup signal handlers.
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/dist/cvs/src/main.c | 4 | ||||
| -rw-r--r-- | gnu/dist/cvs/src/patch.c | 5 | ||||
| -rw-r--r-- | gnu/dist/cvs/src/rcs.c | 4 |
3 files changed, 13 insertions, 0 deletions
diff --git a/gnu/dist/cvs/src/main.c b/gnu/dist/cvs/src/main.c index 691e63572a7..380110cac32 100644 --- a/gnu/dist/cvs/src/main.c +++ b/gnu/dist/cvs/src/main.c @@ -350,6 +350,10 @@ main_cleanup (sig) #ifndef DONT_USE_SIGNALS const char *name; char temp[10]; + static int reenter = 0; + + if (reenter++) + _exit(1); switch (sig) { diff --git a/gnu/dist/cvs/src/patch.c b/gnu/dist/cvs/src/patch.c index e6a25f5ccb3..a4b2c9e936d 100644 --- a/gnu/dist/cvs/src/patch.c +++ b/gnu/dist/cvs/src/patch.c @@ -771,6 +771,11 @@ patch_dirproc (callerdat, dir, repos, update_dir, entries) static RETSIGTYPE patch_cleanup () { + static int reenter = 0; + + if (reenter++) + _exit(1); + /* Note that the checks for existence_error are because we are called from a signal handler, without SIG_begincrsect, so we don't know whether the files got created. */ diff --git a/gnu/dist/cvs/src/rcs.c b/gnu/dist/cvs/src/rcs.c index 8347d44cb9a..a6d31e35ab5 100644 --- a/gnu/dist/cvs/src/rcs.c +++ b/gnu/dist/cvs/src/rcs.c @@ -8238,6 +8238,10 @@ count_delta_actions (np, ignore) RETSIGTYPE rcs_cleanup () { + static int reenter = 0; + + if (reenter++) + _exit(1); /* Note that the checks for existence_error are because we are called from a signal handler, so we don't know whether the files got created. */ |
