Mercurial > hg > xemacs-beta
diff lib-src/gnuserv.c @ 5853:1044acf60048
Revert part of Jerry's December 2014 that broke gnuclient on some OS X.
lib-src/ChangeLog addition:
2015-03-08 Aidan Kehoe <kehoea@parhasard.net>
* gnuserv.c (echo_request):
No longer close the file handle unconditionally, leave this to the
individual socket types.
* gnuserv.c (handle_internet_request):
Close the file handle here.
* gnuserv.c (handle_unix_request):
Don't close the file handle here, document why (it broke gnuclient
under OS X). It should actually be OK, but my suspicion is that
the issues is that the Unix (local) domain sockets are still
underdocumented compared to the internet sockets.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 08 Mar 2015 20:59:25 +0000 |
parents | c03dd89e0055 |
children |
line wrap: on
line diff
--- a/lib-src/gnuserv.c Wed Mar 04 15:54:00 2015 +0000 +++ b/lib-src/gnuserv.c Sun Mar 08 20:59:25 2015 +0000 @@ -321,7 +321,6 @@ exit(1); } /* if */ - close(s); } /* echo_request */ @@ -754,6 +753,7 @@ echo_request(s); + close(s); } /* handle_internet_request */ #endif /* INTERNET_DOMAIN_SOCKETS */ @@ -864,6 +864,14 @@ echo_request(s); + /* Closing s here (or rather, within echo_request() with both + internet and local connections) meant gnuserv never returned + usefully under OS X, as of 20150308, reflecting changeset + https://bitbucket.org/xemacs/xemacs/commits/c03dd89 . Keeping it + open is not a significant security risk (it's a local connection, + with file system access restrictions) and given the practical + limitation on the number of handles gnuserv will keep around, + it's also not a significant resource issue. Leave it open. */ } /* handle_unix_request */ #endif /* UNIX_DOMAIN_SOCKETS */