[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: man-db segfault: problem found (but need help for the solution :-)

Fabrizio Polacco <fpolacco@icenet.fi> writes:

> Why the hell the closed stdout _and_ stderr produce a redirection to a
> different stream?
> Can somebody help me to understand this?

I think I found the reason for this behavior. Try to strace man with
closed std*[1], and you'll get this:
	open("/var/catman/index.bt", O_RDWR) = 2
and few lines after that:
	write(2, "\rUpdating index cache for path "..., 50) = 50

Possible answer: 2 is usually stderr, but unfortunately, not this

Possible solution: test for std* on start of man, and reopen it.

> Thank you,
> Fabrizio

Hope this helps.

[1] How to strace man with closed std*, strace -o f man >&- 2>&- is
not working as expected...

Tomislav Vujec                         Tomislav.Vujec@CARNet.hr
To understand recursion, one must first understand recursion...

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . Trouble? 
e-mail to templin@bucknell.edu .

Reply to: