EINTR from open() with smart scheduler

William Waghorn <[email protected]>
Newsgroups gmane.comp.xfree86.devel
Message-ID <[email protected]>
I've recently been trying to track down a problem where calls to
XCreateFontSet unexpectedly fail.  It turns out that while the X server
process tries to open one of the requested fonts, there's a chance that
the open call will fail with the error code EINTR when the new 'Smart
Scheduler' is enabled.

It is my understanding that code which uses timers must be prepared to
retry any system call which can return an EINTR error.

The new Smart Scheduler uses setitimer to configure a SIGALRM signal
every 20ms.  Unfortunately, looking through the source (4.5.0) it would
seem few if any calls to open() are retried after an EINTR error.  I
guess there may be other calls which need to be retried too.


William
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.