1 |
/* Socket I/O operations |
/* Socket I/O operations |
2 |
|
|
3 |
Copyright (C) 1995,96,98,99,2000,02 Free Software Foundation, Inc. |
Copyright (C) 1995,96,98,99,2000,02, 2005 Free Software Foundation, Inc. |
4 |
Written by Miles Bader <miles@gnu.org> |
Written by Miles Bader <miles@gnu.org> |
5 |
|
|
6 |
This program is free software; you can redistribute it and/or |
This program is free software; you can redistribute it and/or |
197 |
|
|
198 |
if (*select_type & SELECT_READ) |
if (*select_type & SELECT_READ) |
199 |
{ |
{ |
200 |
/* Wait for a connect. Passing in NULL for REQ means that the |
/* Wait for a connect. Passing in NULL for SOCK means that |
201 |
request won't be dequeued. */ |
the request won't be dequeued. */ |
202 |
if (connq_listen (sock->listen_queue, 1, NULL, NULL) == 0) |
if (connq_listen (sock->listen_queue, 1, NULL) == 0) |
203 |
/* We can satisfy this request immediately. */ |
/* We can satisfy this request immediately. */ |
204 |
return 0; |
return 0; |
205 |
else |
else |
206 |
/* Gotta wait... */ |
/* Gotta wait... */ |
207 |
{ |
{ |
208 |
ports_interrupt_self_on_port_death (user, reply); |
ports_interrupt_self_on_port_death (user, reply); |
209 |
return connq_listen (sock->listen_queue, 0, NULL, NULL); |
return connq_listen (sock->listen_queue, 0, NULL); |
210 |
} |
} |
211 |
} |
} |
212 |
} |
} |