* dtable.cc (dtable::init_std_file_from_handle): Add some defensive code to
invalid handle case.
This commit is contained in:
parent
d7e7027d12
commit
10dedaaa4c
|
@ -1,3 +1,8 @@
|
||||||
|
2002-01-06 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* dtable.cc (dtable::init_std_file_from_handle): Add some defensive
|
||||||
|
code to invalid handle case.
|
||||||
|
|
||||||
2002-01-06 Corinna Vinschen <corinna@vinschen.de>
|
2002-01-06 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* ioctl.cc (ioctl): Make third argument optional.
|
* ioctl.cc (ioctl): Make third argument optional.
|
||||||
|
|
|
@ -91,8 +91,8 @@ dtable::extend (int howmuch)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize the file descriptor/handle mapping table.
|
/* Initialize the file descriptor/handle mapping table.
|
||||||
We only initialize the parent table here. The child table is
|
This function should only be called when a cygwin function is invoked
|
||||||
initialized at each fork () call. */
|
by a non-cygwin function, i.e., it should only happen very rarely. */
|
||||||
|
|
||||||
void
|
void
|
||||||
stdio_init (void)
|
stdio_init (void)
|
||||||
|
@ -197,7 +197,10 @@ dtable::init_std_file_from_handle (int fd, HANDLE handle, DWORD myaccess)
|
||||||
first_fd_for_open = 0;
|
first_fd_for_open = 0;
|
||||||
|
|
||||||
if (!handle || handle == INVALID_HANDLE_VALUE)
|
if (!handle || handle == INVALID_HANDLE_VALUE)
|
||||||
|
{
|
||||||
|
fds[fd] = NULL;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (__fmode)
|
if (__fmode)
|
||||||
bin = __fmode;
|
bin = __fmode;
|
||||||
|
|
Loading…
Reference in New Issue