util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bug in the script util
@ 2012-11-06 20:01 Daniel Narvaez
  0 siblings, 0 replies; only message in thread
From: Daniel Narvaez @ 2012-11-06 20:01 UTC (permalink / raw)
  To: util-linux; +Cc: kerolasa

Hello,

it seems like the following commit introduced a bug.

commit cdd2a8c360c70d16804ace7cc923a6c6bb7c9ca9
Author: Sami Kerola <kerolasa@iki.fi>
Date:   Wed Apr 4 19:44:04 2012 +0200

    term-utils: verify writing to streams was successful

    Signed-off-by: Sami Kerola <kerolasa@iki.fi>

Before the commit

script -e -c "echo"
echo $?
0

After the commit

script -e -c "echo"
echo $?
1

I think what happens is that we first close stderr in dooutput (as
timingfd) and then we try to close it again in atexit(close_stdout),
causing the error.

In fact redirecting timingfd to a file fixes it

script -t/tmp/a -e -c "echo"
echo $?
0

-- 
Daniel Narvaez

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-11-06 20:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-06 20:01 Bug in the script util Daniel Narvaez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).