autobaud hangup fix
Troy Bergstrand
ncbergst at ndsuvax.UUCP
Tue Aug 23 00:47:56 AEST 1988
The version of autobaud that we got off the net did not always successfully
kill -HUP the processes belonging to a terminal that lost its line.
Apply the following diff:
*** old.c Thu Aug 18 10:29:34 1988
--- autobaud.c Thu Aug 18 10:25:40 1988
***************
*** 66,75 ****
--- 66,78 ----
chown(ttyname,0,0); /* make root the owner */
chmod(ttyname,0622); /* and set the protections */
}
+ signal(SIGHUP, SIG_IGN);
+ vhangup();
if (open(ttyname,O_RDWR) != 0) /* open once for stdin */
abort(ttyname);
dup(0); /* dup for stdout */
dup(0); /* dup for stderr */
+ signal(SIGHUP, SIG_DFL);
}
ttyb.sg_ispeed = ttyb.sg_ospeed = B2400; /* sample line at 2400 baud */
--
J. Troy Bergstrand North Dakota State University, Fargo, ND 58105
UUCP: ...!uunet!ndsuvax!ncbergst
BITNET: ncbergst at ndsuvax.bitnet
INTERNET: ncbergst at plains.NoDak.edu
More information about the Comp.sources.bugs
mailing list