* krlogin.c:
authorRichard Basch <probe@mit.edu>
Wed, 16 Nov 1994 16:49:01 +0000 (16:49 +0000)
committerRichard Basch <probe@mit.edu>
Wed, 16 Nov 1994 16:49:01 +0000 (16:49 +0000)
If the system includes a SA_RESTART signal flag, use it.
We want to resume the read() system call after a SIGURG comes.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4664 dc483132-0cff-0310-8789-dd5450dbe970

src/appl/bsd/ChangeLog
src/appl/bsd/krlogin.c

index f24494fd6867a1eaca1201754c5aec4c4d336705..37aaa340e23e458eca70638e5309b3bb3b6a7c61 100644 (file)
@@ -1,3 +1,10 @@
+Wed Nov 16 11:45:01 1994  Richard Basch  (probe@tardis)
+
+       * krlogin.c:
+       If the system includes a SA_RESTART signal flag, use it.
+       We want to be able to resume the read() system call after
+       a SIGURG comes.
+
 Fri Nov 11 00:53:57 1994  Theodore Y. Ts'o  (tytso@dcl)
 
        * forward.c (mk_cred, rd_cred): Move mk_cred and rd_cred to
index 065a05f266240f941fb90aee43462cf76b7ee7a5..d5d36680266329387c242497f4fe721462bb4b6b 100644 (file)
@@ -1394,6 +1394,11 @@ reader(oldmask)
     sa.sa_handler = SIG_IGN;
     (void) sigaction(SIGTTOU, &sa, (struct sigaction *)0);
 
+#ifdef SA_RESTART
+    /* Because SIGURG will be coming in during a read,
+     * we want to restart the syscall afterwards. */
+    sa.sa_flags |= SA_RESTART;
+#endif
     sa.sa_handler = oob;
     (void) sigaction(SIGURG, &sa, (struct sigaction *)0);
 #else