X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Tue, 18 May 2010 11:09:58 -0400
From: Christopher Faylor <cgf-use-the-mailinglist-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: vfork always fail problem
Message-ID: <20100518150957.GA7838@ednor.casa.cgf.cx>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <AANLkTik_jo0N1YtUTFLzsqAsv5OkkyjCG9epeMq55bWk@mail.gmail.com> <op.vcop6qoo1e62zd@merlin.emma.line.org> <AANLkTikoAoUAarNLwuIHe6GypKg62rjKR1VPyQYygT17@mail.gmail.com> <20100514192202.GB8785@calimero.vinschen.de> <u1vd9ahgy.fsf@acm.org> <20100518143136.GB5909@ednor.casa.cgf.cx> <4BF2A806.9030603@redhat.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@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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

