]> diplodocus.org Git - nmh/commit
After further reflection, I decided I didn't like that previous
authorKen Hornstein <kenh@pobox.com>
Thu, 18 May 2017 03:28:02 +0000 (23:28 -0400)
committerKen Hornstein <kenh@pobox.com>
Thu, 18 May 2017 03:28:02 +0000 (23:28 -0400)
commitfbb92a858ba6b30b8110c0f3aa05e9376e4fe418
tree99664ac10a0d8d366678dea1a467e978890469b9
parentd11f8c6ba92fc28c3ea4d76676ff7d5148c36d7d
After further reflection, I decided I didn't like that previous
implementation.  Instead, allocate two ptys and connect one to standard
input and the other to standard output and standard error of the child
process.  After the first data is received from the slave, close the
master connected to standard input; that will generate an EOF on input
to the child process.  This ends up being much cleaner than looping and
waiting to send the EOF character to the child process.
test/runpty.c