in reply to Re^5: Long Process Waits Until End to Display Results
in thread Long Process Waits Until End to Display Results

It is possible that he did not properly background the forked-off process, and therefore Apache was waiting for all possible output to come back before sending anything. (Apache needs that to be able to include the size of the response in the return headers that it sends to the browser.)

The fun with buffering is that there are many processes involved, and if any one of them buffers, you won't get your output.

  • Comment on Re^6: Long Process Waits Until End to Display Results

Replies are listed 'Best First'.
Re^7: Long Process Waits Until End to Display Results
by C_T (Scribe) on Dec 09, 2004 at 19:12 UTC
    It is possible that he did not properly background the forked-off process,

    What should I be doing to make sure the process is properly backgrounded?

    CT

    Charles Thomas
    Madison, WI
      Close all file descriptors. That either means calling close on STDIN, STDOUT and STDERR (or opening them to files) or else launching a new process with all of those redirected.

      You could have found that at this FAQ entry.