Russ
If my approach is completely wrong, I'm fine with abandoning it. Maybe
there's just something simple I'm overlooking, though.
Dave.
It looks right to me. It is possible that read-from-standard input
is always interrupted by ^Z, regardless of the restart setting.
It's worth trying under strace -f to double-check the system calls.
Russ
I don't think we need to bother. People using ^Z get what the
operating system sees fit to provide.
Russ
We're talking about a very specific case: ^Z on a Mac.
^Z is a clumsy hack introduced before there were
window systems that could give you multiple virtual
terminal sessions at once. Luckily, every modern Mac
includes a window system that lets you create as many
terminals as you want, meaning ^Z is less important,
which is probably Apple has not fixed this OS bug.
It cannot be Go's role to bring sanity to job control.
That is setting ourselves up for failure.
Russ
A C program would exhibit the same buggy behavior.
Even /bin/cat exhibits this buggy behavior.