mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
convert all to use sys/linux over sys/unix; new implementations for pipe, process and env
This commit is contained in:
@@ -1,7 +1,17 @@
|
||||
//+private
|
||||
package os2
|
||||
|
||||
import "core:sys/linux"
|
||||
|
||||
_pipe :: proc() -> (r, w: ^File, err: Error) {
|
||||
return nil, nil, nil
|
||||
fds: [2]linux.Fd
|
||||
errno := linux.pipe2(&fds, {.CLOEXEC})
|
||||
if errno != .NONE {
|
||||
return nil, nil,_get_platform_error(errno)
|
||||
}
|
||||
|
||||
r = _new_file(uintptr(fds[0]))
|
||||
w = _new_file(uintptr(fds[1]))
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user