Subject: Re: CVS commit: src/lib/libc/rpc
To: Christos Zoulas <christos@zoulas.com>
From: Rui Paulo <rpaulo@fnop.net>
List: source-changes
Date: 11/05/2005 22:38:13
--kORqDWCi7qDJ0mEj
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2005.11.05 15:48:44 -0500, Christos Zoulas wrote:
| On Nov 5,  8:59am, chuq@chuq.com (Chuck Silvers) wrote:
| -- Subject: Re: CVS commit: src/lib/libc/rpc
|=20
| | hi,
| |=20
| | part of this change is:
| |=20
| | +#ifdef _REENTRANT
| | +                       if (errno =3D=3D EINTR) {
| | +                               sigset_t rmask;
| | +                               if (sigpending(&rmask) =3D=3D -1) {
| | +                                       cu->cu_error.re_errno =3D errno;
| | +                                       release_fd_lock(cu->cu_fd, mask=
);
| | +                                       return cu->cu_error.re_status =
=3D
| | +                                           RPC_SYSTEMERROR;
| | +                               }
| | +                               (void)sigsuspend(&rmask);
| | +                       }
| | +#endif
| |=20
| |=20
| | 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 s=
ense
| | 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 cal=
ling
| | the RPC code, and the library shouldn't allow signals that the applicat=
ion
| | has intentionally blocked.  I think this block should just be removed.
| |=20
| | also, it looks like sigpending() needs a threaded version in libpthread=
 too.
| |=20
| | -Chuck
|=20
| I thought that the signal would be still pending at this point. I will re=
move
| it.

My bad. Thanks.

		-- Rui Paulo

--kORqDWCi7qDJ0mEj
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (NetBSD)

iD8DBQFDbTRVZPqyxs9FH4QRAj/XAJ4kZFuDY4UHc4g9rGci825xJY0qkACfb4KF
XeheRAz4QZM5CH5y2WQA1a4=
=n7DM
-----END PGP SIGNATURE-----

--kORqDWCi7qDJ0mEj--