Check whether these are still a problem:

We try to re-open /proc/self/fd/1, etc., which is /dev/pts/1, etc.
However, in a multi-user system, /dev/pts/1 may now be owned by someone
else.  So, we should try to open /dev/tty or something instead.

At least, in Linux, when the X-windows session was owned by one user,
and I had opened an xterm, and done an su to myself, the other user
still owned /dev/pts/1, and I couldn't access it.

If a user is typing to standard input during checkpointing, some input
in the typeahead buffer could get lost.  We don't try to flush the
typeahead buffer and feed it to the applications after restart.
