in reply to Re: while reading a file, transfer the same data to two different processes.
in thread while reading a file, transfer the same data to two different processes.

His reason for using fork isn't parallelisation, it's crash-resistance. Threads won't help at all.
  • Comment on Re^2: while reading a file, transfer the same data to two different processes.

Replies are listed 'Best First'.
Re^3: while reading a file, transfer the same data to two different processes.
by Anonymous Monk on May 20, 2010 at 22:09 UTC
    Shouldn't he be using eval in that case?
      To know what he should use would require knowing his needs, and I don't know them. eval offers far less protection than forking. eval catches exceptions. Forking catches exceptions, signals and faults. It also provide a fresh environment which clears leaks and corrupt structures.