Re: ypbind: convert from select to poll

2016-07-08 Thread Todd C. Miller
On Mon, 04 Jul 2016 12:43:12 +0200, Jeremie Courreges-Anglas wrote: > This was initially prompted by a diff to replace calloc with > reallocarray. As noted by guenther, there is a problem with the > comparisons between width, rpcsock and pingsock; this, plus the fd_set > allocation inconvenience

Re: ypbind: convert from select to poll

2016-07-05 Thread Todd C. Miller
On Tue, 05 Jul 2016 07:32:19 +0200, Jeremie Courreges-Anglas wrote: > Updated diff: > - ignore EINTR > - add a comment about POLLHUP, for people that could be tempted to copy > the code. Looks great, OK millert@ - todd

Re: ypbind: convert from select to poll

2016-07-04 Thread Jeremie Courreges-Anglas
"Todd C. Miller" writes: > On Mon, 04 Jul 2016 14:45:57 +0200, Jeremie Courreges-Anglas wrote: > >> The two sockets we check for are SOCK_DGRAM sockets, I assumed that we >> can't get POLLHUP on such sockets. Wrong assumption? > > That should be fine then, you can only get POLLHUP for connection

Re: ypbind: convert from select to poll

2016-07-04 Thread Todd C. Miller
On Mon, 04 Jul 2016 14:45:57 +0200, Jeremie Courreges-Anglas wrote: > The two sockets we check for are SOCK_DGRAM sockets, I assumed that we > can't get POLLHUP on such sockets. Wrong assumption? That should be fine then, you can only get POLLHUP for connection-oriented sockets. - todd

Re: ypbind: convert from select to poll

2016-07-04 Thread Jeremie Courreges-Anglas
"Todd C. Miller" writes: > On Mon, 04 Jul 2016 12:43:12 +0200, Jeremie Courreges-Anglas wrote: > >> Showing this to a wider audience, >> >> This was initially prompted by a diff to replace calloc with >> reallocarray. As noted by guenther, there is a problem with the >> comparisons between widt

Re: ypbind: convert from select to poll

2016-07-04 Thread Todd C. Miller
On Mon, 04 Jul 2016 12:43:12 +0200, Jeremie Courreges-Anglas wrote: > Showing this to a wider audience, > > This was initially prompted by a diff to replace calloc with > reallocarray. As noted by guenther, there is a problem with the > comparisons between width, rpcsock and pingsock; this, plus

ypbind: convert from select to poll

2016-07-04 Thread Jeremie Courreges-Anglas
Showing this to a wider audience, This was initially prompted by a diff to replace calloc with reallocarray. As noted by guenther, there is a problem with the comparisons between width, rpcsock and pingsock; this, plus the fd_set allocation inconvenience would be easily fixed by moving from sele