Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I am writing a mini-shell that will be similar to linux shell.

When i fork a process ,i set the child process to differ group id from the father process ( setpgrp() )

How am i waiting till all the child group ID process will end in the father process( in pid>0)?

I try waitpid(0 ,&stastus ,0 ) or waitpid(-pid ,&status ,0 ) but it still not working.
Posted
Comments
Richard MacCutchan 30-Mar-14 9:52am    
What does "not working" mean? Please do not expect us to guess what your code does and what reults you see.
[no name] 30-Mar-14 9:56am    
You forgot to link to [REDACTED].com.
OriginalGriff 30-Mar-14 9:57am    
Don't give the name: that is what he wants!
OriginalGriff 30-Mar-14 9:57am    
I'm just guessing that this is a mistake: the previous questions and answer by this poster were site feeding spam - reported in the S&A Forum.

The others were similar, but had links to his website "sneaked in".

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900