Maxime Devos <maximede...@telenet.be> writes:

> But since the new is based on the old …

Right.  I'm most concerned with the changes being made relative to what
we had.

> • EINTR is not in the list of errors mentioned by POSIX (so would never 
> happen on correct POSIX systems)

I'm not sure this matters for a Z release.  Current Guile will handle
EINTR for ttyname() right now (the way it does for everything else), and
changing it might break any systems that, correctly or incorrectly
according to POSIX, do return EINTR.

> • Did you ever see (outside somewhat overzealous automation) any code
> that checks for EINTR? If you are implementing a kernel, better don’t
> return EINTR, or it would break things.

Clearly Guile does all the time via (at least) SCM_SYSCALL?  In any
case, also related
https://www.gnu.org/software/libc/manual/html_node/Interrupted-Primitives.html

And I'm pretty sure I have seen EINTR before myself, but I haven't been
doing the relevant C-level work intensively for a while.

> (You could still retry after EINTR, but you would need to implement a loop 
> yourself: something like do { lock(); syscall(); save errno; unlock(); tick} 
> while(error == EINTR) }.)

I don't understand -- Guile clearly intends to do a specific thing right
now for EINTR (described by SCM_SYSCALL and scm_syserror).  Why should
ttyname() be treated specially?

And I feel like whether or not that specific approach should be
reconsidered is outside the scope of this change.

Thanks
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4

Reply via email to