Merge: Added contributing guidelines and link from readme
[nit.git] / lib / core / exec.nit
index 10c5374..6c03c7f 100644 (file)
@@ -98,6 +98,7 @@ class Process
                var args = new FlatBuffer
                var l = 1 # Number of elements in args
                args.append(command)
+               var arguments = self.arguments
                if arguments != null then
                        for a in arguments do
                                args.add('\0')
@@ -324,6 +325,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