* exceptions.cc (handle_sigsuspend): Force pending signal delivery before
waiting for signals to happen. * signal.cc (sleep): Force pending signal delivery before sleeping. (usleep): Ditto. (signal): Force pending signal delivery before manipulating signal stuff. (sigprocmask): Ditto. (kill_worker): Ditto. (abort): Ditto. (sigaction): Ditto. * syscalls.cc (readv): Force pending signal delivery before I/O. (writev): Ditto. (open): Ditto. * net.cc: Ditto, throughout. * sigproc.cc (sig_dispatch_pending): Deliver any pending signals prior to returning. * tty.cc (tty::make_pipes): Increase pipe buffer size.
This commit is contained in:
@ -576,6 +576,7 @@ cygwin_sendto (int fd, const void *buf, int len, int flags,
|
||||
const struct sockaddr *to, int tolen)
|
||||
{
|
||||
int res;
|
||||
sig_dispatch_pending (0);
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
fhandler_socket *fh = get (fd);
|
||||
@ -599,6 +600,7 @@ cygwin_recvfrom (int fd, void *buf, int len, int flags,
|
||||
struct sockaddr *from, int *fromlen)
|
||||
{
|
||||
int res;
|
||||
sig_dispatch_pending (0);
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
fhandler_socket *fh = get (fd);
|
||||
@ -755,6 +757,7 @@ extern "C" int
|
||||
cygwin_connect (int fd, const struct sockaddr *name, int namelen)
|
||||
{
|
||||
int res;
|
||||
sig_dispatch_pending (0);
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
fhandler_socket *fh = get (fd);
|
||||
@ -843,6 +846,7 @@ static struct servent *servent_buf = NULL;
|
||||
extern "C" struct servent *
|
||||
cygwin_getservbyname (const char *name, const char *proto)
|
||||
{
|
||||
sig_dispatch_pending (0);
|
||||
sigframe thisframe (mainthread);
|
||||
if (check_null_str_errno (name)
|
||||
|| (proto != NULL && check_null_str_errno (proto)))
|
||||
@ -861,6 +865,7 @@ cygwin_getservbyname (const char *name, const char *proto)
|
||||
extern "C" struct servent *
|
||||
cygwin_getservbyport (int port, const char *proto)
|
||||
{
|
||||
sig_dispatch_pending (0);
|
||||
sigframe thisframe (mainthread);
|
||||
if (proto != NULL && check_null_str_errno (proto))
|
||||
return NULL;
|
||||
@ -879,6 +884,7 @@ cygwin_gethostname (char *name, size_t len)
|
||||
{
|
||||
int PASCAL win32_gethostname (char *, int);
|
||||
|
||||
sig_dispatch_pending (0);
|
||||
sigframe thisframe (mainthread);
|
||||
if (__check_null_invalid_struct_errno (name, len))
|
||||
return -1;
|
||||
@ -961,6 +967,7 @@ cygwin_gethostbyname (const char *name)
|
||||
static char *tmp_addr_list[2];
|
||||
static int a, b, c, d;
|
||||
|
||||
sig_dispatch_pending (0);
|
||||
sigframe thisframe (mainthread);
|
||||
if (check_null_str_errno (name))
|
||||
return NULL;
|
||||
@ -1001,6 +1008,7 @@ cygwin_gethostbyname (const char *name)
|
||||
extern "C" struct hostent *
|
||||
cygwin_gethostbyaddr (const char *addr, int len, int type)
|
||||
{
|
||||
sig_dispatch_pending (0);
|
||||
sigframe thisframe (mainthread);
|
||||
if (__check_invalid_read_ptr_errno (addr, len))
|
||||
return NULL;
|
||||
@ -1025,6 +1033,7 @@ extern "C" int
|
||||
cygwin_accept (int fd, struct sockaddr *peer, int *len)
|
||||
{
|
||||
int res;
|
||||
sig_dispatch_pending (0);
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
fhandler_socket *fh = get (fd);
|
||||
@ -1045,6 +1054,7 @@ extern "C" int
|
||||
cygwin_bind (int fd, const struct sockaddr *my_addr, int addrlen)
|
||||
{
|
||||
int res;
|
||||
sig_dispatch_pending (0);
|
||||
sigframe thisframe (mainthread);
|
||||
fhandler_socket *fh = get (fd);
|
||||
|
||||
@ -1062,6 +1072,7 @@ extern "C" int
|
||||
cygwin_getsockname (int fd, struct sockaddr *addr, int *namelen)
|
||||
{
|
||||
int res;
|
||||
sig_dispatch_pending (0);
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
fhandler_socket *fh = get (fd);
|
||||
@ -1082,6 +1093,7 @@ extern "C" int
|
||||
cygwin_listen (int fd, int backlog)
|
||||
{
|
||||
int res;
|
||||
sig_dispatch_pending (0);
|
||||
sigframe thisframe (mainthread);
|
||||
fhandler_socket *fh = get (fd);
|
||||
|
||||
@ -1099,6 +1111,7 @@ extern "C" int
|
||||
cygwin_shutdown (int fd, int how)
|
||||
{
|
||||
int res;
|
||||
sig_dispatch_pending (0);
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
fhandler_socket *fh = get (fd);
|
||||
@ -1164,6 +1177,7 @@ extern "C" int
|
||||
cygwin_getpeername (int fd, struct sockaddr *name, int *len)
|
||||
{
|
||||
int res;
|
||||
sig_dispatch_pending (0);
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
fhandler_socket *fh = get (fd);
|
||||
@ -1204,6 +1218,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);
|
||||
sigframe thisframe (mainthread);
|
||||
if (__check_null_invalid_struct_errno (domain, len))
|
||||
return -1;
|
||||
@ -1798,6 +1813,7 @@ get_ifconf (struct ifconf *ifc, int what)
|
||||
unsigned long lip, lnp;
|
||||
struct sockaddr_in *sa;
|
||||
|
||||
sig_dispatch_pending (0);
|
||||
sigframe thisframe (mainthread);
|
||||
if (check_null_invalid_struct_errno (ifc))
|
||||
return -1;
|
||||
@ -1875,6 +1891,7 @@ cygwin_rcmd (char **ahost, unsigned short inport, char *locuser,
|
||||
{
|
||||
int res = -1;
|
||||
SOCKET fd2s;
|
||||
sig_dispatch_pending (0);
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
if (check_null_invalid_struct_errno (ahost) ||
|
||||
@ -1919,6 +1936,7 @@ extern "C" int
|
||||
cygwin_rresvport (int *port)
|
||||
{
|
||||
int res;
|
||||
sig_dispatch_pending (0);
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
if (check_null_invalid_struct_errno (port))
|
||||
@ -1950,6 +1968,7 @@ cygwin_rexec (char **ahost, unsigned short inport, char *locuser,
|
||||
{
|
||||
int res = -1;
|
||||
SOCKET fd2s;
|
||||
sig_dispatch_pending (0);
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
if (check_null_invalid_struct_errno (ahost) ||
|
||||
@ -1998,6 +2017,7 @@ socketpair (int family, int type, int protocol, int *sb)
|
||||
cygheap_fdnew sb0;
|
||||
fhandler_socket *fh;
|
||||
|
||||
sig_dispatch_pending (0);
|
||||
sigframe thisframe (mainthread);
|
||||
if (__check_null_invalid_struct_errno (sb, 2 * sizeof (int)))
|
||||
return -1;
|
||||
@ -2197,6 +2217,7 @@ extern "C" int
|
||||
cygwin_recvmsg (int fd, struct msghdr *msg, int flags)
|
||||
{
|
||||
int res;
|
||||
sig_dispatch_pending (0);
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
fhandler_socket *fh = get (fd);
|
||||
@ -2223,6 +2244,7 @@ extern "C" int
|
||||
cygwin_sendmsg (int fd, const struct msghdr *msg, int flags)
|
||||
{
|
||||
int res;
|
||||
sig_dispatch_pending (0);
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
fhandler_socket *fh = get (fd);
|
||||
|
Reference in New Issue
Block a user