in reply to Monitoring after fork && exit

Why are you closing them?

Update: Why are you closing them before the fork, if you want to print things afterwards?

____________________
Jeremy
I didn't believe in evil until I dated it.

Replies are listed 'Best First'.
Re: Monitoring after fork && exit
by neilwatson (Priest) on May 24, 2003 at 14:31 UTC
    The program moves to the background to be executed later in the day. I want the user to be free to logout.

    Neil Watson
    watson-wilson.ca

      You don't need to close them to allow the user to logout, you just need to ignore SIGPIPE. But you still haven't explained what goes funny after you close them and fork. If you are doing something like trying to print after you close them, then of course things will go funny.

      The more information you can give us, the closer to an answer we can get. I'll skip the usual ACME::MindReader joke here..

      ____________________
      Jeremy
      I didn't believe in evil until I dated it.

        Sorry. The full script asks the user some input questions and then contructs a newsletter to be emailed to customers. I have the program fork && exit after it has all the needed user input.

        After the fork the program waits until the evening before it sends the mail. The other day a user ran the program but newsletter was never sent. As I did not see the user's screen at the time I can't tell whether the script is in error or the user. Thus I wanted to log everything that happens after the fork && exit.

        Neil Watson
        watson-wilson.ca