#: 11411 S12/OS9/68000 (OSK)
19-Jul-91 21:09:16
Sb: #forks and pipes
Fm: Bob van der Poel 76510,2203
To: all
I'm having a weird problem with pipes and forks (sounds like a dinner...).
Here's the deal:
1. Process1 opens a pipe,
2. '1' starts process2 (a filter of some kind),
3. '1' sends a bunch of data down the pipeline,
4. '1' closes the pipe and waits for the child (process2) to end.
All this works fine if the program forks process2 directly. However, if I fork
'shell' with process2 as a param things hang up. The stuff I send down the
pipeline gets processed okay; but the child(ren) never die. I suppose I could
just forget about using the shell, but it'll take care of setting up the
command line for me which I'd have to do otherwise. Besided, it's really
bugging me.
This is all in C on OSK using os9exec() with fork().
I suspect that I have to terminate or wakeup someone with a signal. Not sure
who or what. Any suggestions?
There is 1 Reply.
|