Interrupted system call on open

Love lha at stacken.kth.se
Mon Sep 13 12:25:34 CEST 1999


sperber at Informatik.Uni-Tuebingen.De (Michael Sperber [Mr. Preprocessor]) writes:

> It's SIGALRM.  Come to think of it, both Scheme 48 and Netscape (don't 
> know about Window Maker) use SIGALRM to implement threading.  For
> Scheme 48, the ktrace output shows zillions of them.

[sending this message to the list also since it explain why it happens]

:(

That isn't good. The xfs-arlad rpc is done in the context of the process
that did the request. If while waiting for the request (in a tsleep) its
aborted (SIGALRM or SIGIO) the RPC is aborted.

The problem is that that if a program have set an alarm it probalably have
a reson to set it, like it doesn't want to wait forever on the filesystem.

The bsd xfs mask's off all signals that want is ``bad'', while the linux
xfs does the opposite and masks off all but the ``good'' ones (where good
is SIGINT, SIGTERM, SIGSTOP, SIGKILL).

Guess we'll have to do the same way in the bsd code as in linux.

Dunno what works better.

Try the following patch.

Love, whom thinks compromising sucks.



Index: xfs_dev-common.c
===================================================================
RCS file: /afs/stacken.kth.se/src/SourceRepository/arla/xfs/bsd/xfs_dev-common.c,v
retrieving revision 1.23
diff -u -w -u -w -r1.23 xfs_dev-common.c
--- xfs_dev-common.c	1999/07/24 13:32:57	1.23
+++ xfs_dev-common.c	1999/09/13 10:09:10
@@ -375,13 +375,13 @@
 #ifdef HAVE_STRUCT_PROC_P_SIGMASK
     oldsigmask = xfs_curproc()->p_sigmask;
 #ifdef __sigaddset
-    __sigaddset(&xfs_curproc()->p_sigmask, SIGIO);
+    __sigaddset(&xfs_curproc()->p_sigmask, SIGIO|SIGALRM);
 #else
-    xfs_curproc()->p_sigmask |= sigmask(SIGIO);
+    xfs_curproc()->p_sigmask |= sigmask(SIGIO|SIGALRM);
 #endif /* __sigaddset */
 #elif defined(HAVE_STRUCT_PROC_P_SIGWAITMASK)
     oldsigmask = xfs_curproc()->p_sigwaitmask;
-    sigaddset(&xfs_curproc()->p_sigwaitmask, SIGIO);
+    sigaddset(&xfs_curproc()->p_sigwaitmask, SIGIO|SIGALRM);
 #endif
     /*
      * We have to check if we have a receiver here too because the





More information about the Arla-drinkers mailing list