Well I think I fixed the lock up problems (sorry for bothing you about
that). I didn't think about the file descriptor being changed :) . So
I moved the fd set lines inside the while loop and now it doesn't
lockup.
Still can't figure out how to avoid the double prompt on ctrl-d; but
that's a much more minor issue.
Thanks!
Adam Luter