* cygthread.cc (cygthread::detach): Make error message a little more detailed.
* fhandler.cc (fhandler_base::raw_read): Ditto for debug message. * dcrt0.cc (do_exit): Add some more synchronization tests. * fhandler_fifo.cc (fhandler_fifo::dup): Don't duplicate a nonexistent handle. Use derived return value rather than always retuning 0. * fhandler_netdrive.cc (fhandler_netdrive::exists): Wnet -> WNet. * winsup.h (exit_states): Add a couple of new exit states.
This commit is contained in:
parent
7066fc51d7
commit
b739751db9
|
@ -1,3 +1,14 @@
|
|||
2005-06-07 Christopher Faylor <cgf@timesys.com>
|
||||
|
||||
* cygthread.cc (cygthread::detach): Make error message a little more
|
||||
detailed.
|
||||
* fhandler.cc (fhandler_base::raw_read): Ditto for debug message.
|
||||
* dcrt0.cc (do_exit): Add some more synchronization tests.
|
||||
* fhandler_fifo.cc (fhandler_fifo::dup): Don't duplicate a nonexistent
|
||||
handle. Use derived return value rather than always retuning 0.
|
||||
* fhandler_netdrive.cc (fhandler_netdrive::exists): Wnet -> WNet.
|
||||
* winsup.h (exit_states): Add a couple of new exit states.
|
||||
|
||||
2005-06-06 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* path.cc (symlink_info::check): If GetFileAttributes returns
|
||||
|
|
|
@ -344,7 +344,7 @@ cygthread::detach (HANDLE sigwait)
|
|||
break;
|
||||
default:
|
||||
if (!exiting)
|
||||
api_fatal ("WFMO failed waiting for cygthread '%s'", __name);
|
||||
api_fatal ("WFMO failed waiting for cygthread '%s', %E", __name);
|
||||
break;
|
||||
}
|
||||
/* WAIT_OBJECT_0 means that the thread successfully read something,
|
||||
|
|
|
@ -1013,8 +1013,18 @@ do_exit (int status)
|
|||
#endif
|
||||
|
||||
EnterCriticalSection (&exit_lock);
|
||||
muto::set_exiting_thread ();
|
||||
dll_global_dtors ();
|
||||
|
||||
if (exit_state < ES_SET_MUTO)
|
||||
{
|
||||
exit_state = ES_SET_MUTO;
|
||||
muto::set_exiting_thread ();
|
||||
}
|
||||
|
||||
if (exit_state < ES_GLOBAL_DTORS)
|
||||
{
|
||||
exit_state = ES_GLOBAL_DTORS;
|
||||
dll_global_dtors ();
|
||||
}
|
||||
|
||||
if (exit_state < ES_EVENTS_TERMINATE)
|
||||
{
|
||||
|
|
|
@ -269,7 +269,7 @@ fhandler_base::raw_read (void *ptr, size_t& ulen)
|
|||
break;
|
||||
}
|
||||
default:
|
||||
syscall_printf ("ReadFile %s failed, %E", get_name ());
|
||||
syscall_printf ("ReadFile %s(%p) failed, %E", get_name (), get_handle ());
|
||||
__seterrno_from_win_error (errcode);
|
||||
bytes_read = (size_t) -1;
|
||||
break;
|
||||
|
|
|
@ -184,14 +184,15 @@ fhandler_fifo::dup (fhandler_base *child)
|
|||
if (!res)
|
||||
{
|
||||
fhandler_fifo *ff = (fhandler_fifo *) child;
|
||||
if (!DuplicateHandle (hMainProc, get_output_handle (), hMainProc,
|
||||
&ff->get_output_handle (), false, true,
|
||||
DUPLICATE_SAME_ACCESS))
|
||||
if (get_output_handle ()
|
||||
&& !DuplicateHandle (hMainProc, get_output_handle (), hMainProc,
|
||||
&ff->get_output_handle (), false, true,
|
||||
DUPLICATE_SAME_ACCESS))
|
||||
{
|
||||
__seterrno ();
|
||||
child->close ();
|
||||
res = -1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return res;
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ fhandler_netdrive::exists ()
|
|||
nr.lpLocalName = NULL;
|
||||
nr.lpRemoteName = namebuf;
|
||||
DWORD ret = create_thread_and_wait (GET_RESOURCE_INFO, &nr, NULL, 0,
|
||||
"WnetGetResourceInformation");
|
||||
"WNetGetResourceInformation");
|
||||
if (ret != ERROR_MORE_DATA && ret != NO_ERROR)
|
||||
return 0;
|
||||
return 1;
|
||||
|
|
|
@ -187,6 +187,8 @@ extern "C" int dll_noncygwin_dllcrt0 (HMODULE, per_process *);
|
|||
enum exit_states
|
||||
{
|
||||
ES_NOT_EXITING = 0,
|
||||
ES_SET_MUTO,
|
||||
ES_GLOBAL_DTORS,
|
||||
ES_EVENTS_TERMINATE,
|
||||
ES_THREADTERM,
|
||||
ES_SIGNAL,
|
||||
|
|
Loading…
Reference in New Issue