From: David van Moolenbroek Date: Sat, 22 Oct 2016 11:46:28 +0000 (+0000) Subject: PM: fix alarm signal delivery X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/man.dnssec-coverage.html?a=commitdiff_plain;h=286d266fd0c2c6853131c62e77f8edab8f6dc2bb;p=minix.git PM: fix alarm signal delivery As of change git-87c599d, when processing CLOCK notifications, PM no longer set the current process pointer 'mp'. That pointer is however used when delivering signals through check_sig(), to see whether the current process may deliver a signal to the target process. As a result, delivering SIGALARM signals used a previous pointer in these checks, causing alarm signals not to be delivered in some cases. This patch ensures that alarm signals are again delivered with PM as current process. Change-Id: I94ccbe8b71289df0e1d6d67928e55297bbc28360 --- diff --git a/minix/servers/pm/alarm.c b/minix/servers/pm/alarm.c index e10f84dca..560a1b279 100644 --- a/minix/servers/pm/alarm.c +++ b/minix/servers/pm/alarm.c @@ -338,5 +338,7 @@ cause_sigalrm(int arg) set_alarm(rmp, rmp->mp_interval[ITIMER_REAL]); else rmp->mp_flags &= ~ALARM_ON; + mp = &mproc[0]; /* pretend the signal comes from PM */ + check_sig(rmp->mp_pid, SIGALRM, FALSE /* ksig */); }