#28 POCO not handling EINTR

Platform_Specific
closed
nobody
General (27)
5
2012-09-14
2006-09-05
Caleb Epstein
No

System calls on UNIX are in general interruptable, and
this can happen for example when a process is attached
to by a debugger or process like strace.

POCO doesn't handle EINTR error returns from system
calls gracefully and tends to throw exceptions instead
of ignoring these conditions as a well behaved
application generally should.

For example, if my application spends its time waiting
on a NamedEvent and I attach to it with strace, I get
this type of error in my log:

16:01:15.250 [E] Application: System exception: cannot
wait for named event: ServerApplicationTest.shutdown

When I catch this exception before the Application
class, I can see that errno is set to EINTR. This
should be handled for all blocking system calls (e.g.
select, read, write, semop, etc).

Discussion

  • Logged In: YES
    user_id=1148207

    fixed in 1.2.3