Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Nov 2000 20:17:09 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        fjoe@iclub.nsu.ru (Max Khon)
Cc:        Don.Lewis@tsc.tdk.com (Don Lewis), andrew@ugh.net.au, hackers@FreeBSD.ORG
Subject:   Re: daemon()
Message-ID:  <200011082017.NAA25041@usr08.primenet.com>
In-Reply-To: <Pine.BSF.4.21.0011072025090.37685-100000@iclub.nsu.ru> from "Max Khon" at Nov 07, 2000 08:29:37 PM

next in thread | previous in thread | raw e-mail | index | archive | help
> > } > what is FD 4?
> > } 
> > } I can't reproduce this? Does it always happen?
> > 
> > It might be something that the shell forgets to close, so it will be
> > dependent on which shell you use.
> 
> exactly. this does not happen if I run this program from tcsh
> (but does if I run from bash 1.14.7(1) built from ports
> thanks!

It appears to be a bash bug, with not setting close on exec on
the fd it uses for its tty, in order to hide from shell scripts.

The problem is that if you redirect input, bash has no tty on
which to do reads, etc..

Feel lucky: it used to be worse.  It uses to go out and try
to get the highest posible fd for doing this crap, which meant
waiting for it to eat up all of kernel memory chasing fd's
until there was no more memory available for the per process
open file table.

All in all, bash is pretty buggy.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200011082017.NAA25041>