Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!network.ucsd.edu!pacbell.com!ames!olivea!gossip.pyramid.com!uunet!pipex!uknet!mcsun!fuug!kiae!bitcom!kiae!relcom!newsserv From: ache@astral.msk.su (Andrew A. Chernov, Black Mage) Newsgroups: relcom.fido.ru.unix,comp.os.386bsd.bugs Subject: Re: 1.04 not trying alternates if call fails? (fwd) Message-ID: <yQto1qhy70@astral.msk.su> Date: 17 Apr 93 15:05:27 GMT References: <199304160753.AA02441@backup.sovam.com> Sender: news-service@newcom.kiae.su Reply-To: ache@astral.msk.su Organization: Ha-olahm Yetzirah Lines: 49 In article <C51qKt.JB0@Nyongwa.CAM.ORG> steve@nyongwa.cam.org writes: > I'm not well enough versed in these things to know if it is a bug in linux to > send a SIGHUP to the process closing the port or not. But since in > fconn_close() you don't want to report hangup signals, why not clear the > afSignal[] flag before returning? If it isn't cleared, then the > system-alternates loop in fcall() in uucico.c will fail the second time round. > > Anyway, the following patch seems to work. > > *** conn.c.orig Mon Feb 22 20:25:24 1993 > --- conn.c Mon Feb 22 20:33:10 1993 > *************** > *** 204,209 **** > --- 204,212 ---- > > /* Make sure any signal reporting has been done before we set > fLog_sighup back to TRUE. */ > + /* SMR: it seems to me if we don't care about SIGHUPS, we should clear > + the flag before we return */ > + afSignal[INDEXSIG_SIGHUP] = FALSE; > ulog (LOG_ERROR, (const char *) NULL); > fLog_sighup = TRUE; > This fix mask real problem in taylor uucp (POSIX-related) and doesn't solve it. Right HANGUP after carrier drop goes to incorrect way (uux catch it or next "alternate"). I solve it on my 386bsd some time ago. At first, right solution: 1. #undef HAVE_TIOCNOTTY in unix/detach.c (force it, don't look at TIOCNOTTY definition) 2. #define HAVE_BSD_PGRP 0 in conf.h 3. #define HAVE_SETPGRP 0 in conf.h 4. #define HAVE_SETSID 1 in conf.h Some explanations: 1. setpgrp(0,0) doesn't detach from controlling terminal in POSIX, so we should use setsid() instead. 2. TIOCNOTTY works only if process not a session leader, so it doesn't works after setsid(). -- In-This-Life: Andrew A. Chernov | "Hay mas dicha, mas contento Internet: ache@astral.msk.su | "Que adorar una hermosura FIDOnet: 2:5020/23.34 | "Brujuleada entre los lejos RELCOM Development Team, Moscow, Russia | "De lo imposible?!" (Calderon)