mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
[os2/process]: Implement process_kill
This commit is contained in:
+10
-40
@@ -26,11 +26,11 @@ args := get_args()
|
||||
typically is the path to the currently running executable.
|
||||
*/
|
||||
get_args :: proc() -> []string {
|
||||
args := make([]string, len(runtime.args__), allocator = context.allocator)
|
||||
result := make([]string, len(runtime.args__), allocator = context.allocator)
|
||||
for rt_arg, i in runtime.args__ {
|
||||
args[i] = cast(string) rt_arg
|
||||
result[i] = cast(string) rt_arg
|
||||
}
|
||||
return args[:]
|
||||
return result[:]
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -387,42 +387,12 @@ process_close :: proc(process: Process) -> (Error) {
|
||||
return _process_close(process)
|
||||
}
|
||||
|
||||
// Process_Attributes :: struct {
|
||||
// dir: string,
|
||||
// env: []string,
|
||||
// files: []^File,
|
||||
// sys: ^Process_Attributes_OS_Specific,
|
||||
// }
|
||||
|
||||
// Process_Attributes_OS_Specific :: struct{}
|
||||
|
||||
// Process_Error :: enum {
|
||||
// None,
|
||||
// }
|
||||
|
||||
|
||||
|
||||
// Signal :: #type proc()
|
||||
|
||||
// Kill: Signal = nil
|
||||
// Interrupt: Signal = nil
|
||||
|
||||
// process_start :: proc(name: string, argv: []string, attr: ^Process_Attributes) -> (^Process, Process_Error) {
|
||||
// return nil, .None
|
||||
// }
|
||||
|
||||
// process_release :: proc(p: ^Process) -> Process_Error {
|
||||
// return .None
|
||||
// }
|
||||
|
||||
// process_kill :: proc(p: ^Process) -> Process_Error {
|
||||
// return .None
|
||||
// }
|
||||
|
||||
// process_signal :: proc(p: ^Process, sig: Signal) -> Process_Error {
|
||||
// return .None
|
||||
// }
|
||||
|
||||
|
||||
/*
|
||||
Terminate a process.
|
||||
|
||||
This procedure terminates a process, specified by it's handle, `process`.
|
||||
|
||||
*/
|
||||
process_kill :: proc(process: Process) -> (Error) {
|
||||
return _process_kill(process)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user