Messages in this thread | | | From | "Stephen C. Tweedie" <> | Date | Fri, 3 Mar 2000 18:12:58 +0000 (GMT) | Subject | Re: Changes in the sockets: SIGIO handling |
| |
Hi,
On Thu, 2 Mar 2000 16:41:49 +0200 (EET), Julian Anastasov <uli@linux.tu-varna.acad.bg> said:
> Here is a list of proposed changes in the SIGIO handling for > sockets. This is a patch for 2.3.48. I have a patch for 2.2 too if > someone is interested. I'm still wondering if there are working > applications for 2.2 which expect si_code=SI_SIGIO!
Not as far as I know.
> - Don't return POLL_HUP at EOF, return POLL_IN instead. We will use > POLL_HUP as a marker.
OK, works fine with...
> - return POLL_HUP when: > - close(): sock->shutdown != SHUTDOWN_MASK (or may be always?)
On the other hand > - FASYNC off: send POLL_HUP.
No, there's no need to extend the semantics here. If the user really needs a marker for this event, they can sigqueue() one themselves.
> - tcp_reset() to send POLL_ERR/SIGIO on error
Fine.
> - add SO_ACCEPT_FLAGS socket option. Now accept() can check flags in > sock-> accept_flags. One of these flags is SO_ACCEPT_F_ASYNC: inherit > FASYNC, O_NONBLOCK/O_NDELAY, F_SETSIG and F_SETOWN values from the > listening socket. Send POLL_IN/POLL_ERR according to the sock state.
OK. Fine by me.
> We want to reduce the number of syscalls. More > flags can be added for SO_ACCEPT_FLAGS sock ioctl. For now I > added only the O_NONBLOCK/FASYNC/ownership inheritance but > some TCP options can be inherited too. The other option is > to create new acceptXXX() syscall but may be this is more difficult > task.
Right, and the other way to reduce syscalls here will be to implement a sigtimedwait4() syscall which lets a user dequeue multiple siginfo events at once.
--Stephen
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |