Mask out ERR HUP and NVAL from the events field so we don't give IRIX

Tue Apr 27 13:11:29 1999  Owen Taylor  <otaylor@redhat.com>

	* gmain.c (g_main_poll): Mask out ERR HUP and NVAL from
	the events field so we don't give IRIX fits.
This commit is contained in:
Owen Taylor 1999-04-27 17:14:45 +00:00 committed by Owen Taylor
parent 5ee8d2bdb8
commit ff140aa613
10 changed files with 52 additions and 2 deletions

View File

@ -1,3 +1,8 @@
Tue Apr 27 13:11:29 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_main_poll): Mask out ERR HUP and NVAL from
the events field so we don't give IRIX fits.
Tue Apr 20 08:42:22 1999 Tim Janik <timj@gtk.org>
* gscanner.c (g_scanner_unexp_token): behave conservative with

View File

@ -1,3 +1,8 @@
Tue Apr 27 13:11:29 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_main_poll): Mask out ERR HUP and NVAL from
the events field so we don't give IRIX fits.
Tue Apr 20 08:42:22 1999 Tim Janik <timj@gtk.org>
* gscanner.c (g_scanner_unexp_token): behave conservative with

View File

@ -1,3 +1,8 @@
Tue Apr 27 13:11:29 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_main_poll): Mask out ERR HUP and NVAL from
the events field so we don't give IRIX fits.
Tue Apr 20 08:42:22 1999 Tim Janik <timj@gtk.org>
* gscanner.c (g_scanner_unexp_token): behave conservative with

View File

@ -1,3 +1,8 @@
Tue Apr 27 13:11:29 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_main_poll): Mask out ERR HUP and NVAL from
the events field so we don't give IRIX fits.
Tue Apr 20 08:42:22 1999 Tim Janik <timj@gtk.org>
* gscanner.c (g_scanner_unexp_token): behave conservative with

View File

@ -1,3 +1,8 @@
Tue Apr 27 13:11:29 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_main_poll): Mask out ERR HUP and NVAL from
the events field so we don't give IRIX fits.
Tue Apr 20 08:42:22 1999 Tim Janik <timj@gtk.org>
* gscanner.c (g_scanner_unexp_token): behave conservative with

View File

@ -1,3 +1,8 @@
Tue Apr 27 13:11:29 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_main_poll): Mask out ERR HUP and NVAL from
the events field so we don't give IRIX fits.
Tue Apr 20 08:42:22 1999 Tim Janik <timj@gtk.org>
* gscanner.c (g_scanner_unexp_token): behave conservative with

View File

@ -1,3 +1,8 @@
Tue Apr 27 13:11:29 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_main_poll): Mask out ERR HUP and NVAL from
the events field so we don't give IRIX fits.
Tue Apr 20 08:42:22 1999 Tim Janik <timj@gtk.org>
* gscanner.c (g_scanner_unexp_token): behave conservative with

View File

@ -1,3 +1,8 @@
Tue Apr 27 13:11:29 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_main_poll): Mask out ERR HUP and NVAL from
the events field so we don't give IRIX fits.
Tue Apr 20 08:42:22 1999 Tim Janik <timj@gtk.org>
* gscanner.c (g_scanner_unexp_token): behave conservative with

View File

@ -998,7 +998,12 @@ g_main_poll (gint timeout,
if (pollrec->fd->events)
{
fd_array[i].fd = pollrec->fd->fd;
fd_array[i].events = pollrec->fd->events;
/* In direct contradiction to the Unix98 spec, IRIX runs into
* difficulty if you pass in POLLERR, POLLHUP or POLLNVAL
* flags in the events field of the pollfd while it should
* just ignoring them. So we mask them out here.
*/
fd_array[i].events = pollrec->fd->events & ~(G_IO_ERR|G_IO_HUP|G_IO_NVAL);
fd_array[i].revents = 0;
i++;
}

View File

@ -998,7 +998,12 @@ g_main_poll (gint timeout,
if (pollrec->fd->events)
{
fd_array[i].fd = pollrec->fd->fd;
fd_array[i].events = pollrec->fd->events;
/* In direct contradiction to the Unix98 spec, IRIX runs into
* difficulty if you pass in POLLERR, POLLHUP or POLLNVAL
* flags in the events field of the pollfd while it should
* just ignoring them. So we mask them out here.
*/
fd_array[i].events = pollrec->fd->events & ~(G_IO_ERR|G_IO_HUP|G_IO_NVAL);
fd_array[i].revents = 0;
i++;
}