This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: posix/tst-waitid.c possible race condition on Linux
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Rich Felker <dalias at aerifal dot cx>
- Cc: Olivier Langlois <olivier at trillion01 dot com>, libc-alpha at sourceware dot org
- Date: Wed, 12 Jun 2013 19:12:46 -0700 (PDT)
- Subject: Re: posix/tst-waitid.c possible race condition on Linux
- References: <1371011970 dot 749 dot 30 dot camel at Wailaba2> <20130613000330 dot 2D1732C07F at topped-with-meat dot com> <20130613001040 dot GB29800 at brightrain dot aerifal dot cx>
> Wouldn't it make more sense to use sigtimedwait or sigwaitinfo to get
> the signal? This would avoid the race condition without adding a long
> sleep.
Yeah, the test could probably be changed to use sigwait instead of delays.
Feel free to work it out and send a patch.