From a7556ed9f60fca78ee087b858c1b380513d0d40b Mon Sep 17 00:00:00 2001 From: Stelian Pop Date: Sat, 17 Nov 2001 10:44:18 +0000 Subject: [PATCH] dump hang workaround. --- CHANGES | 6 +++++- dump/tape.c | 10 ++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 72c5e3d..1fbbb98 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -$Id: CHANGES,v 1.144 2001/11/17 10:31:46 stelian Exp $ +$Id: CHANGES,v 1.145 2001/11/17 10:44:18 stelian Exp $ Changes between versions 0.4b24 and 0.4b25 (released ??????????????????) ======================================================================== @@ -31,6 +31,10 @@ Changes between versions 0.4b24 and 0.4b25 (released ??????????????????) many users and especially to Eros Albertazzi for reporting this. +7. Found a workaroung for the dump deadlock problem (3 childs + stuck in pause(), father in read()). The workaround seems + to work for me and several beta-testers. If it doesn't work + for you, please report back. Changes between versions 0.4b23 and 0.4b24 (released September 12, 2001) ======================================================================== diff --git a/dump/tape.c b/dump/tape.c index 45535ea..71de659 100644 --- a/dump/tape.c +++ b/dump/tape.c @@ -41,7 +41,7 @@ #ifndef lint static const char rcsid[] = - "$Id: tape.c,v 1.57 2001/09/12 10:21:49 stelian Exp $"; + "$Id: tape.c,v 1.58 2001/11/17 10:44:18 stelian Exp $"; #endif /* not lint */ #include @@ -1040,6 +1040,12 @@ doslave(int cmd, int slave_number, int first) union u_spcl *uspclptr; struct s_spcl *spclptr; #endif /* USE_QFA */ + sigset_t set; + + sigemptyset(&set); + sigaddset(&set, SIGUSR2); + sigprocmask(SIG_BLOCK, &set, NULL); + sigemptyset(&set); /* * Need our own seek pointer. @@ -1178,7 +1184,7 @@ doslave(int cmd, int slave_number, int first) if (sigsetjmp(jmpbuf, 1) == 0) { ready = 1; if (!caught) - (void) pause(); + sigsuspend(&set); } ready = 0; caught = 0; -- 2.39.5