440 Commits

Author SHA1 Message Date
christos
14501124c4 use correct type for poll 2017-01-10 17:45:27 +00:00
wiz
42d8f555f6 Update prototypes to match current RPC code.
Bump date.
2016-12-29 22:07:12 +00:00
christos
6c345d9579 PR/51578: Henning Petersen: Fix leak on error. 2016-10-26 15:39:30 +00:00
christos
4384a68ce2 KNF, no real change (except malloc(x * y) -> calloc(x, y)) 2016-10-26 15:36:17 +00:00
dholland
94048eede3 Typo. 2016-08-08 04:16:45 +00:00
martin
4739ebdb41 Avoid strict alias violation for VAX 2016-02-15 11:07:48 +00:00
christos
50ccfe1eab Generalize the test, compare on the protocol semantics instead of the name
since it could be udp6...
2015-11-13 15:23:17 +00:00
christos
6cd5630e13 Do proper accounting for the extra -1 slot. Perhaps this is too confusing
and it would be better to just access the array with [fd + 1] instead?
2015-11-13 15:22:12 +00:00
tron
25c8e9abea Remove now unnecessary cast. 2015-11-13 11:43:26 +00:00
tron
7655e3065e Don't try to use listen(2) on a UDP socket which will always fail.
Previously this was not a problem because the return value of listen(2)
was ignored. With this fix amd(8) no longer fails to start with the
error message "cannot create rpc/udp service".

TL;DR: Make amd(8) work again
2015-11-13 11:23:08 +00:00
tron
65a6071730 Avoid broken state if realloc(3) fails. 2015-11-13 10:43:32 +00:00
christos
f5dda10488 fix compilation/lint 2015-11-10 20:56:20 +00:00
christos
9a91ff6ff5 CID 1338520: Check NULL
CID 1338521: Fix error (realloc returns different pointer)
2015-11-10 18:11:05 +00:00
christos
aa158b270c CID 1338517: Check negative returns 2015-11-10 18:08:05 +00:00
christos
69deaff196 CID 1338515: Make it clear that the pfd variable can't be NULL 2015-11-10 18:06:53 +00:00
christos
5d9565aab9 CID 1338513: Check listen(2) return 2015-11-10 18:01:16 +00:00
christos
2a964e6106 Add debugging for pollfd 2015-11-08 19:30:53 +00:00
christos
6821cf5fc4 Only do the compat cruft if we are compiling libc. 2015-11-08 02:46:53 +00:00
christos
245e5bc63c initialize revents too. 2015-11-07 23:17:09 +00:00
christos
df8f5914dc PR/50408: Pedro Giffuni: Provide a way for rpc to use poll(2) instead of
select(2), and the linux svc_pollfd and svc_maxpollfd members. Our select(2)
implementation does not suffer from the FD_SETSIZE limitation so this is
not turned on by default.
2015-11-07 23:09:20 +00:00
christos
7c3ee3b303 spell reserved. 2015-11-07 20:24:00 +00:00
christos
f0421a30ec check for errors and recover instead of core-dumping. 2015-11-07 17:34:33 +00:00
christos
670a38d899 Put back NULL tests for allocation failures. 2015-11-07 16:58:24 +00:00
christos
addac9ec10 don't compile with SVC_LEGACY 2015-11-07 14:21:32 +00:00
christos
68e3906c09 simplify more. 2015-11-07 03:06:32 +00:00
christos
841c77b99c Introduce a binary compatible __fd_set_256 that is what the original fdset
size was for libc. Now we can bump it.
2015-11-07 00:42:04 +00:00
christos
01b6ad43e7 Cleanup and simplify.
undef svc_fdset and svc_maxfd to get to the real data for the compat code.
2015-11-06 23:11:09 +00:00
joerg
76218c7768 Don't use macros as types or variable names. 2015-11-06 23:05:09 +00:00
christos
2f904d5a7a - Provide multi-threaded fdset's for everyone not just rump if requested.
- Abstract fd_set access, and don't limit the fd_set size.
- Maintain binary compatibility by keeping the old global variables around.
2015-11-06 19:34:13 +00:00
christos
46615f7efe - Use -1 for the fake raw fd since we will be able to go beyond FD_SETSIZE.
- Poster boy for why it is bad to initialize in declarations :-)
2015-11-06 19:32:08 +00:00
mrg
2603e0673f remove various HAVE_GCC=45 fragments. 2015-04-15 19:13:46 +00:00
justin
7b67337b9d Fix definitions to match headers 2015-03-26 11:31:57 +00:00
christos
26ba80487b Fix non _REENTRANT build. 2015-01-20 18:31:24 +00:00
snj
f0a7346d21 src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
2014-10-18 08:33:23 +00:00
christos
9a513d9643 make more descriptors that we open as close-on-exec 2014-09-18 13:58:20 +00:00
matt
453980f6b8 Assume anything not vax has IEEEFP. 2014-08-24 17:07:00 +00:00
matt
547b3a3b01 Changes to existing files to enable building AARCH64 userland.
evbarm64-el
This is clang only.  While gcc4.8 supports aarch64, no netbsd support has
been written for aarch64 with gcc4.8.
2014-08-10 05:56:36 +00:00
christos
f75f663858 Don't try to listen on UDP sockets. 2014-05-29 12:35:45 +00:00
christos
721439951a CID 975117: check listen(2) return . 2014-05-28 14:49:28 +00:00
christos
bf67527d19 CID 97511{4,5}: Ignore bindresvport return. It only works for root. 2014-05-28 14:45:57 +00:00
christos
226875968c CID 975113: Ignore __rpc_setnodelay error, it is not fatal 2014-05-28 14:45:19 +00:00
christos
e05a011b8f CID 975112: Ignore bindresvport() return. This is can only succeed for root 2014-05-28 14:41:47 +00:00
christos
002a6c3217 Increment to the value, not the pointer. (Thorsten Brehm) 2014-01-21 17:39:24 +00:00
christos
a8aa636f1e don't lose the RPC error from CLNT_CALL. 2014-01-02 20:12:23 +00:00
christos
fc8781bab9 Avoid casting gymnastics that lead to pointer aliasing by introducing an
inline function.
2013-10-17 23:58:05 +00:00
christos
1eb9e03aa2 - add __clnt_sigfillset() that does not blindly block all signals but excludes
the tty generated ones (int, quit, tstp), plus term and hup. This makes
  command line clients behave on connect(2) where before they would need
  to be killed from a different tty. Much easier than making the file
  descriptor non-blocking for the duration of connect and then using
  pselect/pollts to detect when actual connection or timeout occured using
  a different sigmask.
- factor out some of the error paths.
2013-05-07 21:08:44 +00:00
christos
b3e96d6652 PR/47747: Thorsten Brehm: TCP-based RPC client calls no longer terminate when
connections break. Return proper error code.
XXX: pullup 6
2013-04-17 16:36:47 +00:00
dholland
b4acc95ea0 stdlib.h, not malloc.h 2013-04-05 03:17:38 +00:00
tron
47c0e0c312 Replace previous Sun Microsystems, Inc. license with a standard
BSD 3-clause license granted by Oracle America, Inc..
This license change was approved by Wim Coekaerts, Senior Vice President,
Linux and Virtualization at Oracle Corporation.

This fixes PR lib/45293 by Pedro Giffuni.
2013-03-11 20:19:28 +00:00
christos
2dec884d64 make this usable from RUMP 2013-03-05 19:55:22 +00:00