summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordchagin <dchagin@FreeBSD.org>2016-03-08 19:20:57 +0000
committerdchagin <dchagin@FreeBSD.org>2016-03-08 19:20:57 +0000
commit575dff67b1dcefa83400343442ebaf0e69cd98f6 (patch)
tree41a633643e9c59b0b2f7203b1385558a01b119e2
parent87ba812313548fa59dd98d88bae4793c5c4a7950 (diff)
downloadFreeBSD-src-575dff67b1dcefa83400343442ebaf0e69cd98f6.zip
FreeBSD-src-575dff67b1dcefa83400343442ebaf0e69cd98f6.tar.gz
Put a commit message from r296502 about Linux alarm() system call
behaviour to the source. Suggested by: emaste@ MFC after: 1 week
-rw-r--r--sys/compat/linux/linux_misc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index a9c330a..7569644 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -206,6 +206,11 @@ linux_alarm(struct thread *td, struct linux_alarm_args *args)
it.it_value.tv_usec = 0;
it.it_interval.tv_sec = 0;
it.it_interval.tv_usec = 0;
+ /*
+ * According to POSIX and Linux implementation
+ * the alarm() system call is always successfull.
+ * Ignore errors and return 0 as a Linux do.
+ */
kern_setitimer(td, ITIMER_REAL, &it, &old_it);
if (timevalisset(&old_it.it_value)) {
if (old_it.it_value.tv_usec != 0)
OpenPOWER on IntegriCloud