On 2005.11.05 15:48:44 -0500, Christos Zoulas wrote: | On Nov 5, 8:59am, chuq%chuq.com@localhost (Chuck Silvers) wrote: | -- Subject: Re: CVS commit: src/lib/libc/rpc | | | hi, | | | | part of this change is: | | | | +#ifdef _REENTRANT | | + if (errno == EINTR) { | | + sigset_t rmask; | | + if (sigpending(&rmask) == -1) { | | + cu->cu_error.re_errno = errno; | | + release_fd_lock(cu->cu_fd, mask); | | + return cu->cu_error.re_status = | | + RPC_SYSTEMERROR; | | + } | | + (void)sigsuspend(&rmask); | | + } | | +#endif | | | | | | why did you add this part? if we got EINTR, then the signal was already | | delivered and thus won't be pending anymore. plus, why would it make sense | | to set the mask to exactly the signals that are already pending? this would | | require receiving a different signal than any already pending. if the | | intent was to unmask any pending signals, this seems wrong too, because | | the pending signal could have been masked by the application before calling | | the RPC code, and the library shouldn't allow signals that the application | | has intentionally blocked. I think this block should just be removed. | | | | also, it looks like sigpending() needs a threaded version in libpthread too. | | | | -Chuck | | I thought that the signal would be still pending at this point. I will remove | it. My bad. Thanks. -- Rui Paulo
Attachment:
pgpkp3lZy25z6.pgp
Description: PGP signature