Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com Date: Thu, 6 Sep 2001 16:13:43 -0400 From: Christopher Faylor To: cygwin-developers AT cygwin DOT com Subject: Re: Figured out how to reproduce vfork/rsync bug! (proposed fix) Message-ID: <20010906161343.A4873@redhat.com> Reply-To: cygwin-developers AT cygwin DOT com Mail-Followup-To: cygwin-developers AT cygwin DOT com References: <20010906142836 DOT 7323 DOT qmail AT lizard DOT curl DOT com> <20010906164756 DOT 19885 DOT qmail AT lizard DOT curl DOT com> <20010906203947 DOT Q537 AT cygbert DOT vinschen DOT de> <20010906184747 DOT 20476 DOT qmail AT lizard DOT curl DOT com> <20010906185326 DOT 20521 DOT qmail AT lizard DOT curl DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20010906185326.20521.qmail@lizard.curl.com> User-Agent: Mutt/1.3.21i On Thu, Sep 06, 2001 at 02:53:26PM -0400, Jonathan Kamens wrote: >I think I'll try the patch that cgf just sent out and see if it makes >this problem go away. > >It will be very amusing if we discover that the bug I'm encountering >is the same as Egor's. Try this. cgf Index: spawn.cc =================================================================== RCS file: /cvs/uberbaum/winsup/cygwin/spawn.cc,v retrieving revision 1.86 diff -p -r1.86 spawn.cc *** spawn.cc 2001/08/22 17:50:22 1.86 --- spawn.cc 2001/09/06 20:11:48 *************** spawn_guts (HANDLE hToken, const char * *** 534,545 **** ciresrv.moreinfo->argv = newargv; ciresrv.moreinfo->envc = envsize (envp, 1); ! ciresrv.moreinfo->envp = (char **) cmalloc (HEAP_1_ARGV, ciresrv.moreinfo->envc); ciresrv.hexec_proc = hexec_proc; char **c; const char * const *e; for (c = ciresrv.moreinfo->envp, e = envp; *e;) ! *c++ = cstrdup1 (*e++); *c = NULL; if (mode != _P_OVERLAY || !DuplicateHandle (hMainProc, myself.shared_handle (), hMainProc, --- 534,545 ---- ciresrv.moreinfo->argv = newargv; ciresrv.moreinfo->envc = envsize (envp, 1); ! ciresrv.moreinfo->envp = (char **) cmalloc (HEAP_ARGV, ciresrv.moreinfo->envc); ciresrv.hexec_proc = hexec_proc; char **c; const char * const *e; for (c = ciresrv.moreinfo->envp, e = envp; *e;) ! *c++ = cstrdup (*e++); *c = NULL; if (mode != _P_OVERLAY || !DuplicateHandle (hMainProc, myself.shared_handle (), hMainProc,