Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!bloom-beacon!gatech!udel!mmdf From: LISTSERV%FINHUTC.BITNET@wiscvm.wisc.edu (1.5l) Newsgroups: comp.os.minix Subject: File: "MINIX-L MAIL" being sent to you Message-ID: <549@louie.udel.EDU> Date: Thu, 1-Oct-87 14:55:59 EDT Article-I.D.: louie.549 Posted: Thu Oct 1 14:55:59 1987 Date-Received: Mon, 5-Oct-87 06:42:58 EDT Sender: mmdf@udel.EDU Lines: 42 Received: from NDSUVM1(MAILER) by FINHUTC (Mailer X1.25) id 0501; Thu, 01 Oct 87 18:41:02 FIN Received: by NDSUVM1 (Mailer X1.24) id 3713; Wed, 30 Sep 87 22:10:34 CDT Received: from UDEL.EDU by WISCVM.WISC.EDU ; Wed, 30 Sep 87 22:08:04 CDT Received: from Louie.UDEL.EDU by Louie.UDEL.EDU id aa09888; 30 Sep 87 22:46 EDT Received: from USENET by Louie.UDEL.EDU id aa09576; 30 Sep 87 22:42 EDT ARPA: usenet@udel.EDU, UUCP: ...{harv Source-Info: From (or Sender) name not authenticated. Message-ID: <543@bal.cs.vu.nl> Newsgroups: comp.os.minix Date: 30 Sep 87 13:16:55 GMT Reply-To: INFO-MINIX@UDEL.EDU Sender: Minix operating system From: Henri Bal Subject: bug in check_sig X-LSVRepTo: X-LSVopts: NOACK Org=MINIX-L@NDSUVM1 X-LSVvia: MINIX-L@NDSUVM1 X-LSVTo: info-minix@UDEL.EDU To: $PEER$ The procedure check_sig in the file mm/signal.c contains the following bug. If the signal to be checked is a SIGALRM, the statement on line 6617 (of the original Minix Source Code contained in the book) causes the ALARM_ON bit of every single process to be cleared. So, if an alarm goes off in one process, all other processes that are sleeping will hang forever, because of the test on line 6616. As an example, if you give the commands: (sleep 20; echo A) & (sleep 4; echo B) & only a ``B'' will be printed. The ``sleep 20'' will never terminate. To fix the problem, line 6617 should only clear the ALARM_ON bit if send_sig is TRUE, so it should be changed into: if (send_sig) rmp->mp_flags &= ~ALARM_ON; Also note that the semantics of the alarm signal are subtly different from the Unix semantics. In Unix, if you explicitly send an alarm signal (e.g., by ``kill -14 pid'') to a process that is not sleeping, the process will be killed. In Minix, the signal will be ignored (because of line 6616).