Throughout, eliminate argument to sig_dispatch_pending.
* exceptions.cc (setup_handler): Move non-interruptible condition handling (back) to wait_sig (as suggested by Pierre Humblet). (set_process_mask): Don't worry about calling sig_dispatch_pending from sigthread since it is detected in the function anyway. (sig_handle): Eliminate thisproc arg. Don't call sig_dispatch_pending on SIGCONT since that should happen automatically. * sigproc.cc (sig_dispatch_pending): Eliminate justwake argument. Just return when called from sigthread. (wait_sig): Change some variables to bool. Change inner while to an if. Move uninterruptible signal handling here. (sigproc_terminate): Don't call sig_dispatch_pending. Just increment semaphore on exit. * speclib: Use slightly different (but still flawed) method for determining symbols to extract from libraries.
This commit is contained in:
@ -583,7 +583,7 @@ cygwin_sendto (int fd, const void *buf, int len, int flags,
|
||||
const struct sockaddr *to, int tolen)
|
||||
{
|
||||
int res;
|
||||
sig_dispatch_pending (0);
|
||||
sig_dispatch_pending ();
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
fhandler_socket *fh = get (fd);
|
||||
@ -607,7 +607,7 @@ cygwin_recvfrom (int fd, void *buf, int len, int flags,
|
||||
struct sockaddr *from, int *fromlen)
|
||||
{
|
||||
int res;
|
||||
sig_dispatch_pending (0);
|
||||
sig_dispatch_pending ();
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
fhandler_socket *fh = get (fd);
|
||||
@ -764,7 +764,7 @@ extern "C" int
|
||||
cygwin_connect (int fd, const struct sockaddr *name, int namelen)
|
||||
{
|
||||
int res;
|
||||
sig_dispatch_pending (0);
|
||||
sig_dispatch_pending ();
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
fhandler_socket *fh = get (fd);
|
||||
@ -903,7 +903,7 @@ static struct servent *servent_buf = NULL;
|
||||
extern "C" struct servent *
|
||||
cygwin_getservbyname (const char *name, const char *proto)
|
||||
{
|
||||
sig_dispatch_pending (0);
|
||||
sig_dispatch_pending ();
|
||||
sigframe thisframe (mainthread);
|
||||
if (check_null_str_errno (name)
|
||||
|| (proto != NULL && check_null_str_errno (proto)))
|
||||
@ -922,7 +922,7 @@ cygwin_getservbyname (const char *name, const char *proto)
|
||||
extern "C" struct servent *
|
||||
cygwin_getservbyport (int port, const char *proto)
|
||||
{
|
||||
sig_dispatch_pending (0);
|
||||
sig_dispatch_pending ();
|
||||
sigframe thisframe (mainthread);
|
||||
if (proto != NULL && check_null_str_errno (proto))
|
||||
return NULL;
|
||||
@ -939,7 +939,7 @@ cygwin_getservbyport (int port, const char *proto)
|
||||
extern "C" int
|
||||
cygwin_gethostname (char *name, size_t len)
|
||||
{
|
||||
sig_dispatch_pending (0);
|
||||
sig_dispatch_pending ();
|
||||
sigframe thisframe (mainthread);
|
||||
if (__check_null_invalid_struct_errno (name, len))
|
||||
return -1;
|
||||
@ -1023,7 +1023,7 @@ cygwin_gethostbyname (const char *name)
|
||||
static char *tmp_addr_list[2];
|
||||
static int a, b, c, d;
|
||||
|
||||
sig_dispatch_pending (0);
|
||||
sig_dispatch_pending ();
|
||||
sigframe thisframe (mainthread);
|
||||
if (check_null_str_errno (name))
|
||||
return NULL;
|
||||
@ -1064,7 +1064,7 @@ cygwin_gethostbyname (const char *name)
|
||||
extern "C" struct hostent *
|
||||
cygwin_gethostbyaddr (const char *addr, int len, int type)
|
||||
{
|
||||
sig_dispatch_pending (0);
|
||||
sig_dispatch_pending ();
|
||||
sigframe thisframe (mainthread);
|
||||
if (__check_invalid_read_ptr_errno (addr, len))
|
||||
return NULL;
|
||||
@ -1089,7 +1089,7 @@ extern "C" int
|
||||
cygwin_accept (int fd, struct sockaddr *peer, int *len)
|
||||
{
|
||||
int res;
|
||||
sig_dispatch_pending (0);
|
||||
sig_dispatch_pending ();
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
fhandler_socket *fh = get (fd);
|
||||
@ -1122,7 +1122,7 @@ extern "C" int
|
||||
cygwin_bind (int fd, const struct sockaddr *my_addr, int addrlen)
|
||||
{
|
||||
int res;
|
||||
sig_dispatch_pending (0);
|
||||
sig_dispatch_pending ();
|
||||
sigframe thisframe (mainthread);
|
||||
fhandler_socket *fh = get (fd);
|
||||
|
||||
@ -1140,7 +1140,7 @@ extern "C" int
|
||||
cygwin_getsockname (int fd, struct sockaddr *addr, int *namelen)
|
||||
{
|
||||
int res;
|
||||
sig_dispatch_pending (0);
|
||||
sig_dispatch_pending ();
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
fhandler_socket *fh = get (fd);
|
||||
@ -1161,7 +1161,7 @@ extern "C" int
|
||||
cygwin_listen (int fd, int backlog)
|
||||
{
|
||||
int res;
|
||||
sig_dispatch_pending (0);
|
||||
sig_dispatch_pending ();
|
||||
sigframe thisframe (mainthread);
|
||||
fhandler_socket *fh = get (fd);
|
||||
|
||||
@ -1179,7 +1179,7 @@ extern "C" int
|
||||
cygwin_shutdown (int fd, int how)
|
||||
{
|
||||
int res;
|
||||
sig_dispatch_pending (0);
|
||||
sig_dispatch_pending ();
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
fhandler_socket *fh = get (fd);
|
||||
@ -1245,7 +1245,7 @@ extern "C" int
|
||||
cygwin_getpeername (int fd, struct sockaddr *name, int *len)
|
||||
{
|
||||
int res;
|
||||
sig_dispatch_pending (0);
|
||||
sig_dispatch_pending ();
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
fhandler_socket *fh = get (fd);
|
||||
@ -1286,7 +1286,7 @@ getdomainname (char *domain, size_t len)
|
||||
* in use and include paths for the Domain name in each ?
|
||||
* Punt for now and assume MS-TCP on Win95.
|
||||
*/
|
||||
sig_dispatch_pending (0);
|
||||
sig_dispatch_pending ();
|
||||
sigframe thisframe (mainthread);
|
||||
if (__check_null_invalid_struct_errno (domain, len))
|
||||
return -1;
|
||||
@ -1900,7 +1900,7 @@ get_ifconf (struct ifconf *ifc, int what)
|
||||
unsigned long lip, lnp;
|
||||
struct sockaddr_in *sa;
|
||||
|
||||
sig_dispatch_pending (0);
|
||||
sig_dispatch_pending ();
|
||||
sigframe thisframe (mainthread);
|
||||
if (check_null_invalid_struct_errno (ifc))
|
||||
return -1;
|
||||
@ -1979,7 +1979,7 @@ cygwin_rcmd (char **ahost, unsigned short inport, char *locuser,
|
||||
int res = -1;
|
||||
SOCKET fd2s;
|
||||
|
||||
sig_dispatch_pending (0);
|
||||
sig_dispatch_pending ();
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
if (check_null_invalid_struct_errno (ahost) ||
|
||||
@ -2037,7 +2037,7 @@ extern "C" int
|
||||
cygwin_rresvport (int *port)
|
||||
{
|
||||
int res;
|
||||
sig_dispatch_pending (0);
|
||||
sig_dispatch_pending ();
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
if (check_null_invalid_struct_errno (port))
|
||||
@ -2069,7 +2069,7 @@ cygwin_rexec (char **ahost, unsigned short inport, char *locuser,
|
||||
{
|
||||
int res = -1;
|
||||
SOCKET fd2s;
|
||||
sig_dispatch_pending (0);
|
||||
sig_dispatch_pending ();
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
if (check_null_invalid_struct_errno (ahost) ||
|
||||
@ -2132,7 +2132,7 @@ socketpair (int family, int type, int protocol, int *sb)
|
||||
struct sockaddr_in sock_in, sock_out;
|
||||
int len;
|
||||
|
||||
sig_dispatch_pending (0);
|
||||
sig_dispatch_pending ();
|
||||
sigframe thisframe (mainthread);
|
||||
if (__check_null_invalid_struct_errno (sb, 2 * sizeof (int)))
|
||||
return -1;
|
||||
@ -2333,7 +2333,7 @@ extern "C" int
|
||||
cygwin_recvmsg (int fd, struct msghdr *msg, int flags)
|
||||
{
|
||||
int res;
|
||||
sig_dispatch_pending (0);
|
||||
sig_dispatch_pending ();
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
fhandler_socket *fh = get (fd);
|
||||
@ -2360,7 +2360,7 @@ extern "C" int
|
||||
cygwin_sendmsg (int fd, const struct msghdr *msg, int flags)
|
||||
{
|
||||
int res;
|
||||
sig_dispatch_pending (0);
|
||||
sig_dispatch_pending ();
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
fhandler_socket *fh = get (fd);
|
||||
|
Reference in New Issue
Block a user