fvwm2 causes stdin to be closed when execing within tcl/tk

David Tilbrook dt-hKuJ9UrQZDM at public.gmane.org
Sun Jan 25 09:06:39 UTC 2004


Lennart Sorensen wrote:
> On Sat, Jan 24, 2004 at 06:03:37PM -0500, David Tilbrook wrote:
> 
<snip>

> 
>>P.S.	Coincidently one of the bugs I discovered and reported in
>>	1983 w.r.t. BSD 4.1c was that a number of programs that
>>	did not work correctly when fid 0 was not open (e.g. cpp).
>>	The BSD folks actually extended crt0.o to ensure that
>>	fids 0, 1, and 2 were open.
> 
> 
> I wonder what they decided they should connect those to if they weren't
> already connected to a tty.
> 
The fix was to open /dev/null for read for 0 and for write for 1 & 2
obviously.  That works fine and avoids problems that arose.

Given the special and unfortunate special cases of std{in,out,err}
and the lack of an fdreopen() some programs get twisted when an open
yields a special fid.

The unfortunate thing is that this problem has arisen again after
20 years.

-- david

phiscock-g851W1bGYuGnS0EtXVNi6w at public.gmane.org wrote:

 > There is a tcl/tk newsgroup, which would probably be better equipped
 > to answer this and I have checked the source and nothing jumps out.

I do not get this problem with other window managers so
I don't think that this is a tcl/tk problem.

-- david
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list