From: Herbert Xu <herbert@gondor.apana.org.au>
To: "Pádraig Brady" <P@draigBrady.com>
Cc: dash@vger.kernel.org
Subject: Re: inconsistency with handling of symlinked ttys in background
Date: Tue, 15 Mar 2011 17:53:00 +0800 [thread overview]
Message-ID: <20110315095300.GA10726@gondor.apana.org.au> (raw)
In-Reply-To: <4CD91FFB.40105@draigBrady.com>
On Tue, Nov 09, 2010 at 10:18:35AM +0000, Pádraig Brady wrote:
> I noticed a bug with dash-0.5.6-2.fc11.i586
> in that it doesn't redirect from symlinked ttys
> correctly for background processes.
>
> $ dash -c "tty < /dev/stdin&"
> $ dash -c "tty < /dev/stdin"
> /dev/pts/3
> $ bash -c "tty < /dev/stdin&"
> /dev/pts/3
> $ dash -c "tty < $(readlink -f /dev/stdin)&"
> /dev/pts/3
It's completely expected as we close stdin for backgrounded
commands.
Try:
bash -c '{ :; tty < /dev/stdin; }&'
Now who is inconsistent? :)
Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
prev parent reply other threads:[~2011-03-15 9:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-09 10:18 inconsistency with handling of symlinked ttys in background Pádraig Brady
2011-03-15 9:53 ` Herbert Xu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110315095300.GA10726@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=P@draigBrady.com \
--cc=dash@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).