Please vote: should we fix or drop the usleep() function?
Keith Marshall <[email protected]> Thu, 20 Nov 2014 16:41:08 +0000
| Newsgroups | gmane.comp.gnu.mingw.devel |
|---|---|
| Organization | MinGW Project |
| Message-ID | <[email protected]> |
Guys, Looking in ChangeLog, I see that (a broken) implementation of usleep() was added to mingwrt in 2008, just about the time that POSIX.1003-1 dropped it, and removed all references to it from the standard. So... 1) Should we go along with POSIX, and similarly drop it, or... 2) Retain it, but mark it as deprecated? I'm of two minds, but if we do decide on (2), then we should also fix the currently broken error return; those earlier versions of POSIX which did specify it said that it *may* fail if the requested delay is 1,000,000 microseconds or more, it which case it should set errno to EINVAL, and return -1; our implementation does not set errno, but returns EINVAL instead of -1. Furthermore, if we do vote to keep usleep(), it seems kind of anomalous that we don't also provide an implementation of sleep(), (which remains a mandatory POSIX function today). Thoughts? -- Regards, Keith. ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk