Now links on systems that lack vhangup (such as AIX) - it might also work...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@67 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1265,7 +1265,10 @@ cleanopen(line)
|
|||||||
*/
|
*/
|
||||||
# if !(defined(CRAY) || defined(__hpux)) && (BSD <= 43) && !defined(STREAMSPTY)
|
# if !(defined(CRAY) || defined(__hpux)) && (BSD <= 43) && !defined(STREAMSPTY)
|
||||||
(void) signal(SIGHUP, SIG_IGN);
|
(void) signal(SIGHUP, SIG_IGN);
|
||||||
|
#ifdef HAVE_VHANGUP
|
||||||
vhangup();
|
vhangup();
|
||||||
|
#else
|
||||||
|
#endif
|
||||||
(void) signal(SIGHUP, SIG_DFL);
|
(void) signal(SIGHUP, SIG_DFL);
|
||||||
t = open(line, O_RDWR|O_NOCTTY);
|
t = open(line, O_RDWR|O_NOCTTY);
|
||||||
if (t < 0)
|
if (t < 0)
|
||||||
@@ -1316,6 +1319,7 @@ cleanopen(line)
|
|||||||
login_tty(t)
|
login_tty(t)
|
||||||
int t;
|
int t;
|
||||||
{
|
{
|
||||||
|
#ifndef _AIX
|
||||||
if (setsid() < 0) {
|
if (setsid() < 0) {
|
||||||
#ifdef ultrix
|
#ifdef ultrix
|
||||||
/*
|
/*
|
||||||
@@ -1327,6 +1331,7 @@ login_tty(t)
|
|||||||
#endif
|
#endif
|
||||||
fatalperror(net, "setsid()");
|
fatalperror(net, "setsid()");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
# ifdef TIOCSCTTY
|
# ifdef TIOCSCTTY
|
||||||
if (ioctl(t, TIOCSCTTY, (char *)0) < 0)
|
if (ioctl(t, TIOCSCTTY, (char *)0) < 0)
|
||||||
fatalperror(net, "ioctl(sctty)");
|
fatalperror(net, "ioctl(sctty)");
|
||||||
@@ -1890,7 +1895,10 @@ cleanup(sig)
|
|||||||
void rmut();
|
void rmut();
|
||||||
|
|
||||||
rmut();
|
rmut();
|
||||||
|
#ifdef HAVE_VHANGUP
|
||||||
vhangup(); /* XXX */
|
vhangup(); /* XXX */
|
||||||
|
#else
|
||||||
|
#endif
|
||||||
(void) shutdown(net, 2);
|
(void) shutdown(net, 2);
|
||||||
exit(1);
|
exit(1);
|
||||||
# endif
|
# endif
|
||||||
|
Reference in New Issue
Block a user