From 2bfcfe526788a3e1c59b35a644f2dd9e2aa1c7b9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net>
Date: Fri, 27 Mar 1998 15:14:41 -0800
Subject: [PATCH] bugfix

Rev: bin/export.pike:1.18
Rev: src/block_alloc.h:1.3
Rev: src/callback.c:1.13
Rev: src/signal_handler.c:1.40
Rev: src/threads.h:1.38
---
 bin/export.pike      | 13 +++++++++----
 src/block_alloc.h    |  3 +++
 src/callback.c       |  7 ++++---
 src/signal_handler.c |  2 +-
 src/threads.h        |  1 +
 5 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/bin/export.pike b/bin/export.pike
index 48d1da91e1..c71d1bfe41 100755
--- a/bin/export.pike
+++ b/bin/export.pike
@@ -1,6 +1,6 @@
 #!/usr/local/bin/pike
 
-/* $Id: export.pike,v 1.17 1998/03/26 05:37:30 hubbe Exp $ */
+/* $Id: export.pike,v 1.18 1998/03/27 23:12:45 hubbe Exp $ */
 
 #include <simulate.h>
 
@@ -49,7 +49,7 @@ void fix_configure(string dir)
     if(!config || config_in[3] > config[3])
     {
       werror("Fixing configure in "+dir+".\n");
-      system("cd "+dir+" ; autoconf");
+      Process.create_process(({"autoconf"}),(["cwd":dir]))->wait();
     }
   }
 }
@@ -88,12 +88,17 @@ int main(int argc, string *argv)
   if(file_stat("pike/CVS"))
   {
     werror("Bumping release number.\n");
-    system("cd pike/src ; cvs update version.c");
+    Process.create_process(({"cvs","update","version.c"}),
+			   (["cwd":"pike/src"] ))->wait();
     string s=Stdio.read_file("pike/src/version.c");
     sscanf(s,"%s release %d%s",string pre, int rel, string post);
     rel++;
     Stdio.File("pike/src/version.c","wct")->write(pre+" release "+rel+post);
-    system("cvs commit -m 'release number bumped by export.pike' src/version.c");
+    Process.create_process(({"cvs","commit","-m",
+			       "release number bumped by export.pike",
+			       "version.c"}),
+			   (["cwd":"pike/src"]))->wait();
+
 
     vpath=replace(getversion()," ","-");
     string tag=replace(vpath,({"Pike-","."}),({"","_"}));
diff --git a/src/block_alloc.h b/src/block_alloc.h
index ba4792cfa9..0b38f66fdf 100644
--- a/src/block_alloc.h
+++ b/src/block_alloc.h
@@ -1,3 +1,4 @@
+#define PRE_INIT_BLOCK(X)
 #define INIT_BLOCK(X)
 #define EXIT_BLOCK(X)
 #define BLOCK_ALLOC(DATA,BSIZE)									\
@@ -30,6 +31,7 @@ struct DATA *PIKE_CONCAT(alloc_,DATA)(void)							\
     for(e=0;e<BSIZE;e++)									\
     {												\
       n->x[e].next=PIKE_CONCAT3(free_,DATA,s);							\
+      PRE_INIT_BLOCK( (n->x+e) );								\
       PIKE_CONCAT3(free_,DATA,s)=n->x+e;							\
     }												\
   }												\
@@ -44,6 +46,7 @@ inline void PIKE_CONCAT(free_,DATA)(struct DATA *d)						\
 {												\
   EXIT_BLOCK(d);										\
   d->next=PIKE_CONCAT3(free_,DATA,s);								\
+  PRE_INIT_BLOCK(d);										\
   PIKE_CONCAT3(free_,DATA,s)=d;									\
 }												\
 												\
diff --git a/src/callback.c b/src/callback.c
index 4c05b76a46..23a36d2524 100644
--- a/src/callback.c
+++ b/src/callback.c
@@ -28,6 +28,10 @@ struct callback
 };
 
 #define CALLBACK_CHUNK 128
+#ifdef DEBUG
+#undef PRE_INIT_BLOCK
+#define PRE_INIT_BLOCK(X) X->free_func=(callback_func)remove_callback;
+#endif
 BLOCK_ALLOC(callback, CALLBACK_CHUNK)
 
 
@@ -207,9 +211,6 @@ void free_callback_list(struct callback_list *lst)
       l->free_func(l, l->arg, 0);
     *ptr=l->next;
     free_callback(l);
-#ifdef DEBUG
-    l->free_func=(callback_func)remove_callback;
-#endif
   }
 }
 
diff --git a/src/signal_handler.c b/src/signal_handler.c
index 4a93147a73..b395ba34d4 100644
--- a/src/signal_handler.c
+++ b/src/signal_handler.c
@@ -1116,7 +1116,7 @@ void f_create_process(INT32 args)
 	    /* Kluge for HP-(S)UX */
 	    if(initgroupgid>60000 &&
 	       initgroups(wanted_uid,-2) &&
-	       initgroups(wanted_uid,65534)
+	       initgroups(wanted_uid,65534) &&
 	       initgroups(wanted_uid,60001))
 #endif /* _HPUX_SOURCE */
 	    {
diff --git a/src/threads.h b/src/threads.h
index ec647a7f5a..e0905a3cbf 100644
--- a/src/threads.h
+++ b/src/threads.h
@@ -441,6 +441,7 @@ void f_all_threads(INT32 args);
 #define th_cleanup()
 #define th_init_programs()
 #define th_self() ((void*)0)
+#define co_signal(X)
 #endif /* _REENTRANT */
 
 #ifdef __NT__
-- 
GitLab