Revision 1114
changed the sigchld handler to only wait on robot proc's so that it doesn't try to wait on gui things
branches/simulator/projects/simulator/simulator/core/robot.c | ||
---|---|---|
313 | 313 |
|
314 | 314 |
void sig_chld_handler(int sig) |
315 | 315 |
{ |
316 |
int ret,stat; |
|
316 |
int ret,stat,i;
|
|
317 | 317 |
|
318 | 318 |
pthread_mutex_lock(&all_finished_mutex); |
319 | 319 |
|
320 |
while((ret = waitpid(-1, &stat, WUNTRACED | WNOHANG))) |
|
321 |
{ |
|
320 |
|
|
321 |
for(i=0; i<num_robots; i++) { |
|
322 |
|
|
323 |
ret = waitpid(robots[i].pid, &stat, WUNTRACED | WNOHANG); |
|
324 |
|
|
322 | 325 |
if(ret==-1) |
323 | 326 |
err(errno,"error waiting on robot"); |
324 | 327 |
|
Also available in: Unified diff