Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Unix pipes

Name: noob 2009-11-07 21:00

How do you normally work with pipes in unix programming? Do you have one parent process that spawns many children and then keeps track of them or could you somehow make a nice chain where the child process fork() again and again and then wait() for each other or something?

Yeah its an assignment, and i have already solved it in an ugly way... Im just curious how you normally do this. Btw. one of the programs i have in my pipe-chain is less, and it wont work any other way than if i do a exec() in the parent process, but then i cant keep track of i'ts exit status. Can i somehow get it into the foreground of the console while still having it as a child to my parent process?

Name: noob 2009-11-09 4:49

>>16
Fuck, this method dosen't work with my code since none of the children will die before less dies.
And then, the singal handler is removed as well.
So I've got to set up another process that works as a handler, or just redo this from the start and do it right, somehow...

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List