aboutsummaryrefslogtreecommitdiff
path: root/sbin/init
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2004-09-28 04:22:55 +0000
committerWarner Losh <imp@FreeBSD.org>2004-09-28 04:22:55 +0000
commit89e3b380f9983b1f6a59afea3061b268c230f6a0 (patch)
tree87fd1caceedfb9bfcce9c741c035273ef509ce48 /sbin/init
parentc6eadeaa6626a8c3abd51cd45ed51eb73a594656 (diff)
downloadsrc-89e3b380f9983b1f6a59afea3061b268c230f6a0.tar.gz
src-89e3b380f9983b1f6a59afea3061b268c230f6a0.zip
Turns out that revision 1.52 was a bad idea. It broke the long
standing ability to list a non-existant device in /etc/ttys to keep it from dying. This is a documented feature of init(8): The init utility can also be used to keep arbitrary daemons running, automatically restarting them if they die. In this case, the first field in the ttys(5) file must not reference the path to a configured device node and will be passed to the daemon as the final argument on its com- mand line. This is similar to the facility offered in the AT&T System V UNIX /etc/inittab. So rather than fix the man page to 'break' this feature, back out the change. At the time this change was made, people felt that the spamage from getty was annoying on headless consoles. Andrew Gallatin noted: > Most of my machines are headless without video cards and use a serial > console. With devfs this means that /dev/ttyv[1-N] do not exist and > getty bitches like this: > > Sep 26 11:00:11 monet getty[543]: open /dev/ttyv1: No such file or directory and we went off and applied this hack rather than fixing getty to sleep forever when it gets an unknown device, as was Andrew's other suggestion. Since it breaks things, I'm off to do that instead.
Notes
Notes: svn path=/head/; revision=135868
Diffstat (limited to 'sbin/init')
-rw-r--r--sbin/init/init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/init/init.c b/sbin/init/init.c
index ac8f23e028ee..6daeab8b8d56 100644
--- a/sbin/init/init.c
+++ b/sbin/init/init.c
@@ -935,7 +935,7 @@ new_session(session_t *sprev, int session_index, struct ttyent *typ)
* then don't add the device to the session list.
*/
if ((fd = open(sp->se_device, O_RDONLY | O_NONBLOCK, 0)) < 0) {
- if (errno == ENXIO || errno == ENOENT) {
+ if (errno == ENXIO) {
free_session(sp);
return (0);
}