This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: open() not handling previously opened serial port gracefully?
- From: Christopher Faylor <cgf at redhat dot com>
- To: cygwin-patches at cygwin dot com
- Date: Thu, 31 Oct 2002 19:33:01 -0500
- Subject: Re: open() not handling previously opened serial port gracefully?
- References: <3.0.5.32.20021031192006.00826c90@mail.attbi.com>
- Reply-to: cygwin-patches at cygwin dot com
On Thu, Oct 31, 2002 at 07:20:06PM -0500, Pierre A. Humblet wrote:
>This fixes
>http://sources.redhat.com/ml/cygwin/2002-10/msg01792.html
Go ahead and check this in, Pierre.
Thanks for tracking it down.
cgf
>2002-10-31 Pierre Humblet <pierre.humblet@ieee.org>
>
> * fhandler.cc (fhandler_base::open): Verify pc isn't NULL.
>
>--- fhandler.cc.orig 2002-10-31 18:46:24.000000000 -0500
>+++ fhandler.cc 2002-10-31 18:47:38.000000000 -0500
>@@ -442,7 +442,7 @@ fhandler_base::open (path_conv *pc, int
>
> if (x == INVALID_HANDLE_VALUE)
> {
>- if (pc->isdir () && !wincap.can_open_directories ())
>+ if (!wincap.can_open_directories () && pc && pc->isdir ())
> {
> if (mode & (O_CREAT | O_EXCL) == (O_CREAT | O_EXCL))
> set_errno (EEXIST);