lib/core: add `Sys::pid`
[nit.git] / lib / core / exec.nit
index 10c5374..76d9d63 100644 (file)
@@ -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