Re: Piping an application which uses fork()




On Mar 12, 2005, at 12:51 PM, Stefano Esposito wrote:

Now the command i call is a programm written in C and uses fork(), when i try to grab its output i obtain only the output that comes out before the fork() call, while all the other out come in the consolle from which i run my program. Where's my error?

i'll guess that the C program doesn't use the same stdout for its fork()ed child as it does for itself. not sure why that would be, because iirc the file descriptors are inherited by child processes.

--
That's it! It's one thing for a ghost to scare my children, but it's another to play my theremin!
  - Homer Simpson




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]