feat: add Process.pid and Process.ppid foreign static methods to os module
Implement uv_os_getpid() and uv_os_getppid() bindings in process.c, register them in the CLI module table, expose as foreign statics in os.wren, and add a test suite verifying both return positive integers with pid greater than ppid.
This commit is contained in:
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
import "os" for Process
|
||||
|
||||
System.print(Process.pid is Num) // expect: true
|
||||
System.print(Process.pid.isInteger) // expect: true
|
||||
System.print(Process.pid > 0) // expect: true
|
||||
|
||||
System.print(Process.ppid is Num) // expect: true
|
||||
System.print(Process.ppid.isInteger) // expect: true
|
||||
System.print(Process.ppid > 0) // expect: true
|
||||
|
||||
System.print(Process.pid > Process.ppid) // expect: true
|
||||
Reference in New Issue
Block a user