From fec300e03dc5601c8d1e906b56cfcd6b22627f84 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net>
Date: Mon, 30 Aug 1999 14:49:40 -0700
Subject: [PATCH] bugfix..

Rev: bin/export.pike:1.26
Rev: src/signal_handler.c:1.153
---
 bin/export.pike      |  6 ++++--
 src/signal_handler.c | 31 ++++++++++---------------------
 2 files changed, 14 insertions(+), 23 deletions(-)

diff --git a/bin/export.pike b/bin/export.pike
index dddd078569..cdb1df6b57 100755
--- a/bin/export.pike
+++ b/bin/export.pike
@@ -1,8 +1,9 @@
 #!/usr/local/bin/pike
 
-/* $Id: export.pike,v 1.25 1999/07/02 14:22:53 grubba Exp $ */
+/* $Id: export.pike,v 1.26 1999/08/30 21:49:25 hubbe Exp $ */
 
 #include <simulate.h>
+import Stdio;
 
 multiset except_modules  =(<>);
 string vpath;
@@ -59,6 +60,7 @@ void fix_configure(string dir)
 
 string getversion()
 {
+//  werror("FNORD:%O\n",getcwd());
   string s=Stdio.read_file("pike/src/version.h");
 
   int maj, min, build;
@@ -108,7 +110,7 @@ int main(int argc, string *argv)
     exit(1);
   }
   tmp=reverse(tmp[e+1..]);
-  cd(tmp*"/");
+  cd(sizeof(tmp)<1 ? tmp*"/" : "/");
   werror("Sourcedir = "+tmp*"/"+"/pike\n");
 
   if(file_stat("pike/CVS"))
diff --git a/src/signal_handler.c b/src/signal_handler.c
index c190a3d779..0412d9cfe5 100644
--- a/src/signal_handler.c
+++ b/src/signal_handler.c
@@ -25,7 +25,7 @@
 #include "main.h"
 #include <signal.h>
 
-RCSID("$Id: signal_handler.c,v 1.152 1999/08/30 19:39:25 grubba Exp $");
+RCSID("$Id: signal_handler.c,v 1.153 1999/08/30 21:49:40 hubbe Exp $");
 
 #ifdef HAVE_PASSWD_H
 # include <passwd.h>
@@ -2355,16 +2355,10 @@ void f_create_process(INT32 args)
 #endif
     }while(pid==-1 && errno==EINTR);
 
-    if(pid!=-1)
-    {
-      if(pid)
-	th_atfork_parent();
-      else
-	th_atfork_child();
-    }
-    /* FIXME: Shouldn't th_atfork_parent() be called if pid == -1?
-     * /grubba 1999-08-30
-     */
+    if(pid)
+      th_atfork_parent();
+    else
+      th_atfork_child();
 
     UNSET_ONERROR(err);
 
@@ -2730,17 +2724,12 @@ void f_fork(INT32 args)
   pid=fork();
 #endif
 /*  THREADS_DISALLOW_UID(); */
-  if(pid!=-1)
-  {
-    if(pid)
-      th_atfork_parent();
-    else
-      th_atfork_child();
-  }
-  /* FIXME: Shouldn't th_atfork_parent() be called if pid == -1?
-   * /grubba 1999-08-30
-   */
 
+  if(pid)
+    th_atfork_parent();
+  else
+    th_atfork_child();
+  
   if(pid==-1) {
     error("Fork failed\n"
 	  "errno: %d\n", errno);
-- 
GitLab