Index: spawner.c =================================================================== RCS file: /home/tools/org.eclipse.cdt.core.qnx/library/spawner/spawner.c,v retrieving revision 1.1 diff -u -r1.1 spawner.c --- spawner.c 4 Nov 2002 20:57:06 -0000 1.1 +++ spawner.c 11 Nov 2002 22:25:22 -0000 @@ -225,7 +225,17 @@ (JNIEnv * env, jobject proc, jint pid) { int stat_loc; - return (waitpid(pid, &stat_loc, WEXITED)); + int ret; + int val = -1; + + ret = waitpid(pid, &stat_loc, WEXITED); + if( ret == -1 && errno == EINTR ) { + // Throw an exception here. + } + if( WIFEXITED(stat_loc) ) { + val = WEXITSTATUS(stat_loc); + } + return val; }