From: Daniel B. <da...@us...> - 2003-05-07 11:38:40
|
Update of /cvsroot/sbcl/sbcl/src/runtime In directory sc8-pr-cvs1:/tmp/cvs-serv27520/src/runtime Modified Files: runtime.c Log Message: 0.8alpha.0.17 Package frobbing fix from Matthew Danish to make sb-thread build again Save errno return from waitpid long enough to print the error, as the real errno is clobbered by parent_do_garbage_collect() Index: runtime.c =================================================================== RCS file: /cvsroot/sbcl/sbcl/src/runtime/runtime.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- runtime.c 5 May 2003 23:27:10 -0000 1.26 +++ runtime.c 7 May 2003 11:38:37 -0000 1.27 @@ -468,13 +468,14 @@ maybe_gc_pending=0; while(all_threads && (pid=waitpid(-1,&status,__WALL|WUNTRACED))) { struct thread *th; + int real_errno=errno; while(maybe_gc_pending) parent_do_garbage_collect(); if(pid==-1) { - if(errno == EINTR) { + if(real_errno == EINTR) { continue; } - if(errno == ECHILD) break; - fprintf(stderr,"waitpid: %s\n",strerror(errno)); + if(real_errno == ECHILD) break; + fprintf(stderr,"waitpid: %s\n",strerror(real_errno)); continue; } th=find_thread_by_pid(pid); |