Avoid re-entry in the cleanup signal handlers.

This commit is contained in:
christos 2003-10-09 13:43:00 +00:00
parent f2aa877507
commit 77b4aabadd
3 changed files with 13 additions and 0 deletions

View File

@ -350,6 +350,10 @@ main_cleanup (sig)
#ifndef DONT_USE_SIGNALS #ifndef DONT_USE_SIGNALS
const char *name; const char *name;
char temp[10]; char temp[10];
static int reenter = 0;
if (reenter++)
_exit(1);
switch (sig) switch (sig)
{ {

View File

@ -771,6 +771,11 @@ patch_dirproc (callerdat, dir, repos, update_dir, entries)
static RETSIGTYPE static RETSIGTYPE
patch_cleanup () patch_cleanup ()
{ {
static int reenter = 0;
if (reenter++)
_exit(1);
/* Note that the checks for existence_error are because we are /* Note that the checks for existence_error are because we are
called from a signal handler, without SIG_begincrsect, so called from a signal handler, without SIG_begincrsect, so
we don't know whether the files got created. */ we don't know whether the files got created. */

View File

@ -8238,6 +8238,10 @@ count_delta_actions (np, ignore)
RETSIGTYPE RETSIGTYPE
rcs_cleanup () rcs_cleanup ()
{ {
static int reenter = 0;
if (reenter++)
_exit(1);
/* Note that the checks for existence_error are because we are /* Note that the checks for existence_error are because we are
called from a signal handler, so we don't know whether the called from a signal handler, so we don't know whether the
files got created. */ files got created. */