Re: EINTR from open() with smart scheduler
Marc Aurele La France <[email protected]>
| Newsgroups | gmane.comp.xfree86.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 8 Jun 2005, William Waghorn wrote: > 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. Actually, that's already done in a few cases. For examples, `grep` the contents of hw/xfree86/os-support for "SYSCALL". A patch for something similar in Xserver/os and Xserver/dix would probably be accepted. Marc. +----------------------------------+-----------------------------------+ | Marc Aurele La France | work: 1-780-492-9310 | | Computing and Network Services | fax: 1-780-492-1729 | | 352 General Services Building | email: [email protected] | | University of Alberta +-----------------------------------+ | Edmonton, Alberta | | | T6G 2H1 | Standard disclaimers apply | | CANADA | | +----------------------------------+-----------------------------------+ XFree86 developer and VP. ATI driver and X server internals.