commit c50d928838cdea09c028964a71b053588dcd63a4 parent 046f1810cdd99c4cae64396d766db82a0d7c4b78 Author: Sebastian <sebastian@sebsite.pw> Date: Fri, 26 Jan 2024 19:00:44 -0500 unix: add getpid Signed-off-by: Sebastian <sebastian@sebsite.pw> Diffstat:
A | unix/+freebsd/getpid.ha | | | 7 | +++++++ |
A | unix/+linux/getpid.ha | | | 7 | +++++++ |
A | unix/+openbsd/getpid.ha | | | 7 | +++++++ |
3 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/unix/+freebsd/getpid.ha b/unix/+freebsd/getpid.ha @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: MPL-2.0 +// (c) Hare authors <https://harelang.org> + +use rt; + +// Returns the current process ID. +export fn getpid() int = rt::getpid(); diff --git a/unix/+linux/getpid.ha b/unix/+linux/getpid.ha @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: MPL-2.0 +// (c) Hare authors <https://harelang.org> + +use rt; + +// Returns the current process ID. +export fn getpid() int = rt::getpid(); diff --git a/unix/+openbsd/getpid.ha b/unix/+openbsd/getpid.ha @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: MPL-2.0 +// (c) Hare authors <https://harelang.org> + +use rt; + +// Returns the current process ID. +export fn getpid() int = rt::getpid();