From fb52c233542fe4cd7067cfa57204466c0e3e4003 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Thu, 7 Jan 1999 17:27:28 -0800 Subject: [PATCH] ugly hack Rev: src/signal_handler.c:1.98 --- src/signal_handler.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/signal_handler.c b/src/signal_handler.c index 4a15bf4f5d..68b3a36552 100644 --- a/src/signal_handler.c +++ b/src/signal_handler.c @@ -23,7 +23,7 @@ #include "builtin_functions.h" #include <signal.h> -RCSID("$Id: signal_handler.c,v 1.97 1999/01/08 00:51:53 hubbe Exp $"); +RCSID("$Id: signal_handler.c,v 1.98 1999/01/08 01:27:28 hubbe Exp $"); #ifdef HAVE_PASSWD_H # include <passwd.h> @@ -575,7 +575,20 @@ static void f_pid_status_wait(INT32 args) pid=THIS->pid; if(err) - error("Pike lost track of a child, pid=%d, errno=%d.\n",pid,err); + { + +#define BUGGY_WAITPID + +#ifdef BUGGY_WAITPID + struct svalue key,*s; + key.type=T_INT; + key.u.integer=pid; + s=low_mapping_lookup(pid_mapping, &key); + if(!s || s->type != T_OBJECT || s->u.object != fp->current_object) +#endif + error("Pike lost track of a child, pid=%d, errno=%d.\n",pid,err); + + } THREADS_ALLOW(); #ifdef HAVE_WAITPID @@ -585,6 +598,7 @@ static void f_pid_status_wait(INT32 args) pid=wait4(pid,&status,0,0); #else pid=-1; + errno=ENOTSUP; #endif #endif THREADS_DISALLOW(); -- GitLab