mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
Fix some bogons in my close() handling.
This commit is contained in:
parent
7565cfa2ea
commit
d62f165304
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=20354
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last attempt in the `sysinstall' line, the next
|
* This is probably the last attempt in the `sysinstall' line, the next
|
||||||
* generation being slated for what's essentially a complete rewrite.
|
* generation being slated for what's essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id: main.c,v 1.29 1996/12/11 09:35:02 jkh Exp $
|
* $Id: main.c,v 1.30 1996/12/11 18:23:17 jkh Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Jordan Hubbard. All rights reserved.
|
* Jordan Hubbard. All rights reserved.
|
||||||
@ -42,7 +42,7 @@
|
|||||||
static void
|
static void
|
||||||
screech(int sig)
|
screech(int sig)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "\007Fatal signal %d caught! I'm dead..\n", sig);
|
printf("\007Fatal signal %d caught! I'm dead..\n", sig);
|
||||||
if (RunningAsInit)
|
if (RunningAsInit)
|
||||||
pause();
|
pause();
|
||||||
else
|
else
|
||||||
@ -79,9 +79,13 @@ main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Try to preserve our scroll-back buffer */
|
/* Try to preserve our scroll-back buffer */
|
||||||
if (OnVTY)
|
if (OnVTY) {
|
||||||
for (curr = 0; curr < 25; curr++)
|
for (curr = 0; curr < 25; curr++)
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
|
/* Move stderr aside */
|
||||||
|
if (DebugFD)
|
||||||
|
dup2(DebugFD, 2);
|
||||||
|
}
|
||||||
|
|
||||||
/* Probe for all relevant devices on the system */
|
/* Probe for all relevant devices on the system */
|
||||||
deviceGetAll();
|
deviceGetAll();
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last attempt in the `sysinstall' line, the next
|
* This is probably the last attempt in the `sysinstall' line, the next
|
||||||
* generation being slated to essentially a complete rewrite.
|
* generation being slated to essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id: network.c,v 1.22 1996/12/09 15:16:36 jkh Exp $
|
* $Id: network.c,v 1.23 1996/12/11 09:35:03 jkh Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Jordan Hubbard. All rights reserved.
|
* Jordan Hubbard. All rights reserved.
|
||||||
@ -256,7 +256,7 @@ startPPP(Device *devp)
|
|||||||
struct termios foo;
|
struct termios foo;
|
||||||
extern int login_tty(int);
|
extern int login_tty(int);
|
||||||
|
|
||||||
for (i = getdtablesize(); i; i--)
|
for (i = getdtablesize(); i >= 0; i--)
|
||||||
close(i);
|
close(i);
|
||||||
|
|
||||||
/* We're going over to VTY2 */
|
/* We're going over to VTY2 */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last program in the `sysinstall' line - the next
|
* This is probably the last program in the `sysinstall' line - the next
|
||||||
* generation being essentially a complete rewrite.
|
* generation being essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id: system.c,v 1.67 1996/12/09 06:02:32 jkh Exp $
|
* $Id: system.c,v 1.68 1996/12/11 19:35:26 jkh Exp $
|
||||||
*
|
*
|
||||||
* Jordan Hubbard
|
* Jordan Hubbard
|
||||||
*
|
*
|
||||||
@ -300,7 +300,7 @@ systemCreateHoloshell(void)
|
|||||||
extern int login_tty(int);
|
extern int login_tty(int);
|
||||||
|
|
||||||
ioctl(0, TIOCNOTTY, NULL);
|
ioctl(0, TIOCNOTTY, NULL);
|
||||||
for (i = getdtablesize(); i; i--)
|
for (i = getdtablesize(); i >= 0; --i)
|
||||||
close(i);
|
close(i);
|
||||||
fd = open("/dev/ttyv3", O_RDWR);
|
fd = open("/dev/ttyv3", O_RDWR);
|
||||||
ioctl(0, TIOCSCTTY, &fd);
|
ioctl(0, TIOCSCTTY, &fd);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last attempt in the `sysinstall' line, the next
|
* This is probably the last attempt in the `sysinstall' line, the next
|
||||||
* generation being slated for what's essentially a complete rewrite.
|
* generation being slated for what's essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id: main.c,v 1.29 1996/12/11 09:35:02 jkh Exp $
|
* $Id: main.c,v 1.30 1996/12/11 18:23:17 jkh Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Jordan Hubbard. All rights reserved.
|
* Jordan Hubbard. All rights reserved.
|
||||||
@ -42,7 +42,7 @@
|
|||||||
static void
|
static void
|
||||||
screech(int sig)
|
screech(int sig)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "\007Fatal signal %d caught! I'm dead..\n", sig);
|
printf("\007Fatal signal %d caught! I'm dead..\n", sig);
|
||||||
if (RunningAsInit)
|
if (RunningAsInit)
|
||||||
pause();
|
pause();
|
||||||
else
|
else
|
||||||
@ -79,9 +79,13 @@ main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Try to preserve our scroll-back buffer */
|
/* Try to preserve our scroll-back buffer */
|
||||||
if (OnVTY)
|
if (OnVTY) {
|
||||||
for (curr = 0; curr < 25; curr++)
|
for (curr = 0; curr < 25; curr++)
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
|
/* Move stderr aside */
|
||||||
|
if (DebugFD)
|
||||||
|
dup2(DebugFD, 2);
|
||||||
|
}
|
||||||
|
|
||||||
/* Probe for all relevant devices on the system */
|
/* Probe for all relevant devices on the system */
|
||||||
deviceGetAll();
|
deviceGetAll();
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last program in the `sysinstall' line - the next
|
* This is probably the last program in the `sysinstall' line - the next
|
||||||
* generation being essentially a complete rewrite.
|
* generation being essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id: system.c,v 1.67 1996/12/09 06:02:32 jkh Exp $
|
* $Id: system.c,v 1.68 1996/12/11 19:35:26 jkh Exp $
|
||||||
*
|
*
|
||||||
* Jordan Hubbard
|
* Jordan Hubbard
|
||||||
*
|
*
|
||||||
@ -300,7 +300,7 @@ systemCreateHoloshell(void)
|
|||||||
extern int login_tty(int);
|
extern int login_tty(int);
|
||||||
|
|
||||||
ioctl(0, TIOCNOTTY, NULL);
|
ioctl(0, TIOCNOTTY, NULL);
|
||||||
for (i = getdtablesize(); i; i--)
|
for (i = getdtablesize(); i >= 0; --i)
|
||||||
close(i);
|
close(i);
|
||||||
fd = open("/dev/ttyv3", O_RDWR);
|
fd = open("/dev/ttyv3", O_RDWR);
|
||||||
ioctl(0, TIOCSCTTY, &fd);
|
ioctl(0, TIOCSCTTY, &fd);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last attempt in the `sysinstall' line, the next
|
* This is probably the last attempt in the `sysinstall' line, the next
|
||||||
* generation being slated for what's essentially a complete rewrite.
|
* generation being slated for what's essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id: main.c,v 1.29 1996/12/11 09:35:02 jkh Exp $
|
* $Id: main.c,v 1.30 1996/12/11 18:23:17 jkh Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Jordan Hubbard. All rights reserved.
|
* Jordan Hubbard. All rights reserved.
|
||||||
@ -42,7 +42,7 @@
|
|||||||
static void
|
static void
|
||||||
screech(int sig)
|
screech(int sig)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "\007Fatal signal %d caught! I'm dead..\n", sig);
|
printf("\007Fatal signal %d caught! I'm dead..\n", sig);
|
||||||
if (RunningAsInit)
|
if (RunningAsInit)
|
||||||
pause();
|
pause();
|
||||||
else
|
else
|
||||||
@ -79,9 +79,13 @@ main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Try to preserve our scroll-back buffer */
|
/* Try to preserve our scroll-back buffer */
|
||||||
if (OnVTY)
|
if (OnVTY) {
|
||||||
for (curr = 0; curr < 25; curr++)
|
for (curr = 0; curr < 25; curr++)
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
|
/* Move stderr aside */
|
||||||
|
if (DebugFD)
|
||||||
|
dup2(DebugFD, 2);
|
||||||
|
}
|
||||||
|
|
||||||
/* Probe for all relevant devices on the system */
|
/* Probe for all relevant devices on the system */
|
||||||
deviceGetAll();
|
deviceGetAll();
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last attempt in the `sysinstall' line, the next
|
* This is probably the last attempt in the `sysinstall' line, the next
|
||||||
* generation being slated to essentially a complete rewrite.
|
* generation being slated to essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id: network.c,v 1.22 1996/12/09 15:16:36 jkh Exp $
|
* $Id: network.c,v 1.23 1996/12/11 09:35:03 jkh Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1995
|
* Copyright (c) 1995
|
||||||
* Jordan Hubbard. All rights reserved.
|
* Jordan Hubbard. All rights reserved.
|
||||||
@ -256,7 +256,7 @@ startPPP(Device *devp)
|
|||||||
struct termios foo;
|
struct termios foo;
|
||||||
extern int login_tty(int);
|
extern int login_tty(int);
|
||||||
|
|
||||||
for (i = getdtablesize(); i; i--)
|
for (i = getdtablesize(); i >= 0; i--)
|
||||||
close(i);
|
close(i);
|
||||||
|
|
||||||
/* We're going over to VTY2 */
|
/* We're going over to VTY2 */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* This is probably the last program in the `sysinstall' line - the next
|
* This is probably the last program in the `sysinstall' line - the next
|
||||||
* generation being essentially a complete rewrite.
|
* generation being essentially a complete rewrite.
|
||||||
*
|
*
|
||||||
* $Id: system.c,v 1.67 1996/12/09 06:02:32 jkh Exp $
|
* $Id: system.c,v 1.68 1996/12/11 19:35:26 jkh Exp $
|
||||||
*
|
*
|
||||||
* Jordan Hubbard
|
* Jordan Hubbard
|
||||||
*
|
*
|
||||||
@ -300,7 +300,7 @@ systemCreateHoloshell(void)
|
|||||||
extern int login_tty(int);
|
extern int login_tty(int);
|
||||||
|
|
||||||
ioctl(0, TIOCNOTTY, NULL);
|
ioctl(0, TIOCNOTTY, NULL);
|
||||||
for (i = getdtablesize(); i; i--)
|
for (i = getdtablesize(); i >= 0; --i)
|
||||||
close(i);
|
close(i);
|
||||||
fd = open("/dev/ttyv3", O_RDWR);
|
fd = open("/dev/ttyv3", O_RDWR);
|
||||||
ioctl(0, TIOCSCTTY, &fd);
|
ioctl(0, TIOCSCTTY, &fd);
|
||||||
|
Loading…
Reference in New Issue
Block a user