From: Phillip Susi <psusi@ubuntu.com>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux@vger.kernel.org
Subject: Re: script input redirection / eof handling
Date: Mon, 02 Dec 2013 13:06:05 -0500 [thread overview]
Message-ID: <529CCC0D.70809@ubuntu.com> (raw)
In-Reply-To: <20131202170208.GI5572@x2.net.home>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 12/2/2013 12:02 PM, Karel Zak wrote:
> never ending orphans suck...
Yes, but the idea is not to orphan them in the first place and wait
for them to terminate instead.
> The possible solution (hack) to emulate end-of-file is by write
> "exit\n" to the master tty. For example patch below works for me
> (it also make it more robust for non-ttys).
That only works if the program on the other end knows what "exit"
means, which is basically only true if it's a shell. Surely there
must be a proper way to signal EOF over a pty? Can you use shutdown()
on a pty?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJSnMwNAAoJEI5FoCIzSKrwwvYH+wRd0hXZwZKhElWgpLIjWNOO
82ulPzt1Cld085qllaG8VvO0CSN3JERHD5Eo8iB+YIuI32lNO2dGuGw0MwYJ72cn
whUEqT7BNcnDCDqhPba/ZYcGJ8mCp+3+58BDth8NPu+nma7d6V0n4sAbqO+w6uCS
VZOO9qo2cKYGqs7E2YYWLHBadMGkyLjpDd9j7ZsLxEe6ezb1vFLxSmJQ3CiNLz+i
q2okm0GUipkhMAMCC8zuV1GnUf5sJuSx6QiSkIE5Mok9d8HqOtXTt8F7URAa+YVC
tBtM7dMIfXEQCJil16hTn+KdgiAtNE4BaGkyevW2kohwmKQgKU51/CHlofWGK1s=
=6Ihg
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2013-12-02 18:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-31 14:21 script input redirection / eof handling Phillip Susi
2013-12-02 12:36 ` Karel Zak
2013-12-02 12:54 ` Karel Zak
2013-12-02 14:45 ` Phillip Susi
2013-12-02 17:02 ` Karel Zak
2013-12-02 18:06 ` Phillip Susi [this message]
2013-12-02 22:36 ` Karel Zak
2013-12-02 23:25 ` Karel Zak
2013-12-03 12:55 ` Karel Zak
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=529CCC0D.70809@ubuntu.com \
--to=psusi@ubuntu.com \
--cc=kzak@redhat.com \
--cc=util-linux@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