[343] in Moira

home help back first fref pref prev next nref lref last post

patch for Sun

daemon@ATHENA.MIT.EDU (haynes@cats.ucsc.edu)
Thu Aug 29 20:47:12 1991

To: bug-moira@ATHENA.MIT.EDU
Cc: jik@ATHENA.MIT.EDU, tom@mit.edu
Date: Thu, 29 Aug 91 17:46:39 PDT
From: haynes@cats.ucsc.edu <haynes@cats.UCSC.EDU>

This prevents accumulation of zombies on Suns running the update server.

I don't claim to understand it; it's stolen from Tim Kolar's fixes to the
lp daemon.

*** 1.1	1991/08/29 21:36:56
--- gdb_fserv.c	1991/08/29 22:20:38
***************
*** 1,10 ****
  /*
   *	$Source: /source/common/athena/athena.lib/moira/gdb/RCS/gdb_fserv.c,v $
!  *	$Header: /source/common/athena/athena.lib/moira/gdb/RCS/gdb_fserv.c,v 1.1 1991/08/29 21:36:56 haynes Exp $
   */
  
  #ifndef lint
! static char *rcsid_gdb_fserv_c = "$Header: /source/common/athena/athena.lib/moira/gdb/RCS/gdb_fserv.c,v 1.1 1991/08/29 21:36:56 haynes Exp $";
  #endif	lint
  
  
--- 1,10 ----
  /*
   *	$Source: /source/common/athena/athena.lib/moira/gdb/RCS/gdb_fserv.c,v $
!  *	$Header: /source/common/athena/athena.lib/moira/gdb/RCS/gdb_fserv.c,v 1.5 1991/08/29 22:20:23 haynes Exp $
   */
  
  #ifndef lint
! static char *rcsid_gdb_fserv_c = "$Header: /source/common/athena/athena.lib/moira/gdb/RCS/gdb_fserv.c,v 1.5 1991/08/29 22:20:23 haynes Exp $";
  #endif	lint
  
  
***************
*** 180,186 ****
--- 180,190 ----
  /*	Called on SIGCHILD to reap all dead children.
  /*	
  /************************************************************************/
+ #ifndef sun
  int
+ #else
+ void
+ #endif
  gdb_reaper()
  {
  	union wait status;
***************
*** 213,217 ****
--- 217,230 ----
  int
  g_do_signals()
  {
+ #ifdef sun
+ 	struct sigvec act;
+ 
+ 	act.sv_handler = gdb_reaper;
+         act.sv_mask = 0;
+         act.sv_flags = 0;
+         (void) sigvec(SIGCHLD, &act, NULL);
+ #else
  	(void) signal(SIGCHLD, gdb_reaper);
+ #endif
  }

home help back first fref pref prev next nref lref last post