I have written a program that can run for 16 or 20 hours on a linux box with some form of redhat OS. It runs fine if I start it up with nohup or redirect output to a file, but when a user starts it up, sends it to the background and logs out, it will fail when it tries to send a simple status message (reporting the number of files that file resulted in). It throws an exception, presumably because the stream is no longer valid.
Once we realized why it worked for me, but not for him, I ran a few tests, and discovered that ruby is unique in this behavior when compared with Python, Bash and perl.
Is there a good reason that ruby behaves differently from the other scripting languages in this situation? Is there a way to change it to behave like the rest?
I am pretty sure that C++ (and C) don't care if the end user can see the output of their messages-but I didn't write up a test for those languages. I was surprised to find out that jobs sent to the background didn't go away once you logged out! So, I certainly never tested for this behavior in the past.