[EMAIL PROTECTED] (Ludovic Courtès) writes: > I guess the point of this `_FORTIFY_SOURCE' thing is to help catch > errors related to interactions with the kernel (among others). The idea > is that when performing a system call, one _should_ be concerned about > its result. > > In the case of async.c:250, I don't understand whether/how failure of > the `write ()' call should be handled.
I think it's writing a byte as an inter-thread signaling mechanism. It's pretty unlikely that a single byte write will be interrupted, but if it is then a retry will be needed, so I think the use of SCM_SYSCALL is correct in principle here. How about this, which is more similarly to the other uses of SCM_SYSCALL in the code? SCM_SYSCALL (rv = write (sleep_fd, &dummy, 1)); (Whole patch is below.) Regards, Neil Index: async.c =================================================================== RCS file: /cvsroot/guile/guile/guile-core/libguile/async.c,v retrieving revision 1.86 diff -u -r1.86 async.c --- async.c 17 Apr 2006 00:05:37 -0000 1.86 +++ async.c 19 Oct 2006 18:46:32 -0000 @@ -241,13 +241,14 @@ if (sleep_fd >= 0) { char dummy = 0; + int rv; /* Likewise, T might already been done with sleeping here, but interrupting it once too often does no harm. T might also not yet have started sleeping, but this is no problem either since the data written to a pipe will not be lost, unlike a condition variable signal. */ - write (sleep_fd, &dummy, 1); + SCM_SYSCALL (rv = write (sleep_fd, &dummy, 1)); } /* This is needed to protect sleep_mutex. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel