On Mon, Dec 02, 2013 at 01:06:05PM -0500, Phillip Susi wrote: > 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? Oh, now it reminds me... in include/ttyutils.h we have macros to generate tty control chars, for example ^C char eof = DEF_EOF; if (write(master, &eof, 1) < 0) { warn (_("write failed")); fail(); } pause(); is what we need. Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html