d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Anyone Know Why This Is Wrong? > C Signal Handling
Add Reply New Topic New Poll
Member
Posts: 3,451
Joined: Feb 26 2010
Gold: 0.20
Mar 27 2013 03:04pm
int *status;
waitpid(getpid(), status, 0);

prof says there's a serious bug/ logic or design flaw in that but i can't figure it out
Member
Posts: 16,144
Joined: Mar 27 2008
Gold: 14,618.00
Mar 27 2013 03:14pm
out of the manual: getpid() returns the process ID of the calling process.

and i guess waitpid(pid, ..., ...) waits for the process with the pid you give in the first argument?

so you are waiting for yourself?
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll