Mail Archives: cygwin/2012/06/01/18:09:04
--XRI2XbIfl/05pQwm
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Fri, Jun 01, 2012 at 03:50:19PM -0600, Warren Young wrote:
> >
> >The basic issue is that sem_wait() is being kicked out with EINTR
> >extremely frequently (9 out of 10 times or more),
>=20
> Does the attached program vaguely resemble what your program is
> trying to do? It does get EINTR, but only because I'm using
> alarm(2) to add a timeout to the sem_wait() call.
Yes. In fact it is very close but with a significant difference.
My (inherited) program is using setitimer() as a master timer, and I
am not sure that the signals are being masked correctly per thread.
In fact, the code is a real mess, but what I have observed is that
with 1.7.9, the SIGALRM which was set by thread 1 does not interrupt
thread 2's sem_wait() system call, but with 1.7.10, the SIGALRM does
interrupt thread 2 (but without delivering the SIGALRM to thread 2,
apparently? Need to test some more)
Basically, I was hoping to dig down and find some significant changes
in the way signals and threads interact from the 'working' Cygwin to
the 'non-working', which would convince me that I really need to get
to rewriting this stuff if the current Cygwin is considered to be
proper in that respect. I also wanted to ensure that a bug had not
crept in to Cygwin that would hammer other people with legacy code.
Thanks,
--=20
Ryan C. Underwood, <nemesis AT icequake DOT net>
--XRI2XbIfl/05pQwm
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iD8DBQFPyT1bIonHnh+67jkRAhgnAJ9EDjlzK/XgR8AEXnnOFPnUo3h4gACcCPn/
hBXUM+9y6YOeLo4awzPUn4Q=
=jHtq
-----END PGP SIGNATURE-----
--XRI2XbIfl/05pQwm--
- Raw text -