[PATCH] finishing spawn / vfork signal inheritance

Joe Buehler jbuehler@hekimian.com
Thu Mar 20 17:27:00 GMT 2003


Christopher,

I see that you applied my previous patch for spawnve().  Here is
the missing part -- the parent has to copy its signal handlers to
the child.

Please check this -- this part of Cygwin is complex.  I compiled
it and it fixes vfork() and spawnve().
-- 
Joe Buehler

2003-03-20  Joe Buehler  <jhpb@draco.hekimian.com>

	* spawn.cc: (spawn_guts): copy signal handler info to spawned child.

Index: spawn.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/spawn.cc,v
retrieving revision 1.120
diff -u -r1.120 spawn.cc
--- spawn.cc	13 Feb 2003 02:52:41 -0000	1.120
+++ spawn.cc	20 Mar 2003 17:26:55 -0000
@@ -756,6 +756,8 @@
  	}
        child->dwProcessId = pi.dwProcessId;
        child->hProcess = pi.hProcess;
+	  /* make child inherit our signal settings */
+      child->copysigs (myself);
        child.remember ();
        strcpy (child->progname, real_path);
        /* FIXME: This introduces an unreferenced, open handle into the child.



More information about the Cygwin-developers mailing list