From 907ea339c8bb49b8a1e01a8846181be4c3469658 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Wed, 25 May 2016 15:33:34 -0400 Subject: [PATCH] lib/core: add `Sys::pid` Signed-off-by: Jean Privat --- lib/core/exec.nit | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/core/exec.nit b/lib/core/exec.nit index 10c5374..76d9d63 100644 --- a/lib/core/exec.nit +++ b/lib/core/exec.nit @@ -324,6 +324,9 @@ redef class Sys do return command.to_cstring.system end + + # The pid of the program + fun pid: Int `{ return getpid(); `} end redef class NativeString -- 1.7.9.5