diff options
author | Andrew Tridgell <tridge@samba.org> | 2007-07-04 07:45:41 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:59:05 -0500 |
commit | 4ace7950d4fbd074611865eee816e748c56b7b83 (patch) | |
tree | 446d7c5afd484b319abe81b3385f49b77fe9be93 /source4/smbd | |
parent | 3381a5c3a45e7c7d1c6cf65325b7fb6f6d5ef3a6 (diff) | |
download | samba-4ace7950d4fbd074611865eee816e748c56b7b83.tar.gz samba-4ace7950d4fbd074611865eee816e748c56b7b83.tar.bz2 samba-4ace7950d4fbd074611865eee816e748c56b7b83.zip |
r23702: fixed a "falling back to select" error in the standard process
model. It's much cleaner to get the event system to close the fd,
especially with the complexity of forks
(This used to be commit d1b710f09c95a8181d2b642081282d8c97b37811)
Diffstat (limited to 'source4/smbd')
-rw-r--r-- | source4/smbd/service_stream.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/smbd/service_stream.c b/source4/smbd/service_stream.c index f3f3a67e78..39c7dda227 100644 --- a/source4/smbd/service_stream.c +++ b/source4/smbd/service_stream.c @@ -289,9 +289,13 @@ NTSTATUS stream_setup_socket(struct event_context *event_context, return status; } + /* we will close the socket using the events system */ + socket_set_flags(stream_socket->sock, SOCKET_FLAG_NOCLOSE); + event_add_fd(event_context, stream_socket->sock, socket_get_fd(stream_socket->sock), - EVENT_FD_READ, stream_accept_handler, stream_socket); + EVENT_FD_READ|EVENT_FD_AUTOCLOSE, + stream_accept_handler, stream_socket); stream_socket->private = talloc_reference(stream_socket, private); stream_socket->ops = stream_ops; |