Regarding the EINTR, SCM_SYSCALL redirects to comments in scm_syserror which suggest to me that this may be a known issue:
https://git.savannah.gnu.org/cgit/guile.git/tree/libguile/error.c?h=v3.0.10&id=b2cc237a02dcb13625885e76df28bc254a522100#n135 If so, then I'm inclined to preserve the existing scm_ttyname() behavior for now. I'll look a bit more closely at your locking concern. Unless there's something else going on, I completely agree that we don't want to exit without releasing the lock. 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