Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com From: fortinj AT ibm DOT net Message-ID: <372672FF.8E5F9892@ibm.net> Date: Tue, 27 Apr 1999 22:31:27 -0400 Reply-To: fortinj AT ibm DOT net X-Sender: "" <@smtp-gw01.ny.us.ibm.net> (Unverified) X-Mailer: Mozilla 4.5 [en]C-gatewaynet (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Chris Faylor CC: DJ Delorie , cygwin-developers AT sourceware DOT cygnus DOT com Subject: Re: cygwin1.dll startup and GDB References: <37265A6E DOT 813F8ED8 AT ibm DOT net> <199904280131 DOT VAA28701 AT envy DOT delorie DOT com> <37266BBC DOT F8F24A3A AT ibm DOT net> <199904280206 DOT WAA05486 AT envy DOT delorie DOT com> <19990427221153 DOT A28137 AT cygnus DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Chris, I'll give it a try! John Fortin Chris Faylor wrote: > > Maybe this will fix things. > > There's no need to call OpenFileMapping with a NULL pointer so > don't do it. > > cgf > > Index: shared.cc > =================================================================== > RCS file: /cvs/cvsfiles/devo/winsup/shared.cc,v > retrieving revision 1.55 > diff -u -p -r1.55 shared.cc > --- shared.cc 1999/04/01 03:56:55 1.55 > +++ shared.cc 1999/04/28 02:10:52 > @@ -49,11 +49,15 @@ open_shared (const char *name, HANDLE &s > > if (!shared_h) > { > - char *mapname = name ? shared_name (name, 0) : NULL; > - > - shared_h = OpenFileMappingA (FILE_MAP_READ | FILE_MAP_WRITE, > - TRUE, mapname); > - > + char *mapname; > + if (!name) > + mapname = NULL; > + else > + { > + mapname = shared_name (name, 0); > + shared_h = OpenFileMappingA (FILE_MAP_READ | FILE_MAP_WRITE, > + TRUE, mapname); > + } > if (!shared_h && > !(shared_h = CreateFileMappingA ((HANDLE) 0xffffffff, > &sec_all,