mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 08:24:32 -08:00
Slightly breaking the C standard, but in a way that's unlikely to break things - allow 64-bit process exit status codes.
31 lines
849 B
Modula-2
31 lines
849 B
Modula-2
import "objects/object.def"
|
|
|
|
# A ``process`` object represents a process running on the system, and allows
|
|
# control over the threads, handles, and virtual memory space of that process.
|
|
|
|
object process : object {
|
|
uid 0c69ee0b7502ba31
|
|
|
|
capabilities [
|
|
kill
|
|
create_thread
|
|
]
|
|
|
|
# Create a new empty process
|
|
method create [constructor]
|
|
|
|
# Stop all threads and exit the given process
|
|
method kill [destructor cap:kill]
|
|
|
|
# Stop all threads and exit the current process
|
|
method exit [static noreturn] {
|
|
param result int64 # The result to retrun to the parent process
|
|
}
|
|
|
|
# Give the given process a handle that points to the same
|
|
# object as the specified handle.
|
|
method give_handle {
|
|
param target ref object [handle] # A handle in the caller process to send
|
|
}
|
|
}
|