X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Tue, 18 May 2010 11:09:58 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: vfork always fail problem Message-ID: <20100518150957.GA7838@ednor.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20100514192202 DOT GB8785 AT calimero DOT vinschen DOT de> <20100518143136 DOT GB5909 AT ednor DOT casa DOT cgf DOT cx> <4BF2A806 DOT 9030603 AT redhat DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BF2A806.9030603@redhat.com> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Tue, May 18, 2010 at 08:45:26AM -0600, Eric Blake wrote: >On 05/18/2010 08:31 AM, Christopher Faylor wrote: >>> >>> - WCHAR corefile[strlen (p) + sizeof (".stackdump")]; >>> + WCHAR corefile[wcslen (p) + sizeof (L".stackdump")]; >> ^^^^^^^^^^^^^^^^^^^^^^ >> No L" is needed here, AFAICT. >> >> I've checked this in, removing the L. > >I had to think about that, so I'm replying to document my thoughts. You >want either 'sizeof (".stackdump")' or 'sizeof (L".stackdump") / sizeof >WCHAR'; and since both give the same value, Chris' change is correct. Lately, I've been partial to (strlen (".stackdump") + 1) since that usually translates to a constant. I didn't do that in this case since the original code didn't do it. Of course, the L doesn't hurt anything, regardless. Btw, there is now a snapshot with this change: http://cygwin.com/snapshots/ To the OP: please check it out and verify that it solves your problem. cgf -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple