From 04b831a6926d946ace2fe13693ffa95875429e52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Thu, 8 Sep 2005 13:06:49 +0000 Subject: [PATCH] added pause() (kernel support is lacking though) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14130 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/libroot/posix/unistd/Jamfile | 1 + src/system/libroot/posix/unistd/pause.c | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 src/system/libroot/posix/unistd/pause.c diff --git a/src/system/libroot/posix/unistd/Jamfile b/src/system/libroot/posix/unistd/Jamfile index 618471a1dd..6ce2082b60 100644 --- a/src/system/libroot/posix/unistd/Jamfile +++ b/src/system/libroot/posix/unistd/Jamfile @@ -19,6 +19,7 @@ KernelMergeObject posix_unistd.o : mknod.c mount.c open.c + pause.c pipe.c process.c read.c diff --git a/src/system/libroot/posix/unistd/pause.c b/src/system/libroot/posix/unistd/pause.c new file mode 100644 index 0000000000..73e9e26f10 --- /dev/null +++ b/src/system/libroot/posix/unistd/pause.c @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2005, Haiku Project. All rights reserved. + * Distributed under the terms of the Haiku license. + * + * Author(s): + * Jérôme Duval + */ + +#include +#include +#include +#include + +int +pause() +{ + sigset_t mask; + sigemptyset(&mask); + errno = _kern_sigsuspend(&mask); + return -1; +} +