module

TTY::Syscall

Constants

AT_FDCWD = -100_i64
CLD_CONTINUED = 6
CLD_DUMPED = 3
CLD_EXITED = 1
CLD_KILLED = 2
CLD_STOPPED = 5
CLD_TRAPPED = 4
EACCES = 13
EAGAIN = 11
EBADF = 9
EBUSY = 16
ECHILD = 10
EEXIST = 17
EINTR = 4
EINVAL = 22
EIO = 5
ENODEV = 19
ENOENT = 2
ENOMEM = 12
ENOSYS = 38
ENOTTY = 25
ENXIO = 6
EPERM = 1
EPIPE = 32
F_DUPFD_CLOEXEC = 1030
F_GETFD = 1
F_GETFL = 3
F_SETFD = 2
F_SETFL = 4
FD_CLOEXEC = 1
NR_CHDIR = 80_u64
NR_CLOSE = 3_u64
NR_CLOSE_RANGE = 436_u64
NR_DUP2 = 33_u64
NR_DUP3 = 292_u64
NR_EXECVE = 59_u64
NR_EXIT_GROUP = 231_u64
NR_FCNTL = 72_u64
NR_FORK = 57_u64
NR_GETDENTS64 = 217_u64
NR_GETPGID = 121_u64
NR_GETPID = 39_u64
NR_IOCTL = 16_u64
NR_KILL = 62_u64
NR_OPENAT = 257_u64
NR_PIDFD_OPEN = 434_u64
NR_PIDFD_SEND_SIGNAL = 424_u64
NR_PIPE2 = 293_u64
NR_POLL = 7_u64
NR_READ = 0_u64
NR_RT_SIGACTION = 13_u64
NR_RT_SIGPROCMASK = 14_u64
NR_SETPGID = 109_u64
NR_SETSID = 112_u64
NR_WAIT4 = 61_u64
NR_WAITID = 247_u64
NR_WRITE = 1_u64
O_CLOEXEC = 524288_i64
O_DIRECTORY = 65536_i64
O_NOCTTY = 256_i64
O_NONBLOCK = 2048_i64
O_RDONLY = 0_i64
O_RDWR = 2_i64
P_ALL = 0
P_PGID = 2
P_PID = 1
P_PIDFD = 3
SIG_SETMASK = 2
SIGCONT = 18
SIGKILL = 9
SIGSET_SIZE = 8_u64
SIGSTOP = 19
SIGTERM = 15
WCONTINUED = 8
WEXITED = 4
WNOHANG = 1
WNOWAIT = 16777216
WSTOPPED = 2
WUNTRACED = 2

Class methods

arg(value : Pointer(T)) : Int64 forall T
Source
arg(value : Int) : Int64
Source
arg(value : Nil) : Int64
Source
arg(value : String) : Int64
Source
chdir(path : String) : Nil
Source
check(ret : Int64, operation : String = "syscall", fd : Int32 | Nil = nil, path : String | Nil = nil, request : UInt64 | Nil = nil) : Int64
Source
close(fd : Int32) : Nil
Source
close_fds_from(first : Int32, except : Int32) : Int64
Source
close_fds_via_procfs(first : Int32, last : Int32, except : Int32) : Int64
Source
close_range(first : Int32, last : Int32, flags : UInt32 = 0_u32) : Nil
Source
close_range_fallback?(errno : Int32) : Bool
Source
dup2(old_fd : Int32, new_fd : Int32) : Nil
Source
dup3(old_fd : Int32, new_fd : Int32, flags : Int32 = 0) : Nil
Source
execve(path : String, argv : Pointer(Pointer(UInt8)), envp : Pointer(Pointer(UInt8))) : NoReturn
Source
exit_group(code : Int32) : NoReturn
Source
fcntl(fd : Int32, command : Int32, argument : Int64 = 0_i64) : Int32
Source
fork
Source
getpgid(pid : Int32) : Int32
Source
getpid
Source
ioctl(fd : Int32, request : UInt64, arg : Pointer(T)) : Nil forall T
Source
ioctl(fd : Int32, request : UInt64, arg : Int) : Nil
Source
ioctl_result(fd : Int32, request : UInt64, arg : Pointer(T)) : Int32 forall T
Source
ioctl_result(fd : Int32, request : UInt64, arg : Int) : Int32
Source
kill(pid : Int32, signal : Int32) : Nil
Source
killpg(pgrp : Int32, signal : Int32) : Nil
Source
openat(path : String, flags : Int64) : Int32
Source
pidfd_open(pid : Int32, flags : UInt32 = 0_u32) : Int32
Source
pidfd_send_signal(pidfd : Int32, signal : Int32, flags : UInt32 = 0_u32) : Nil
Source
pipe2(fds : Pointer(Int32), flags : Int32 = 0) : Nil
Source
poll(fds : Pointer(Void), nfds : UInt64, timeout_ms : Int32) : Int32
Source
raw(nr : UInt64, a1 : Int64 = 0_i64, a2 : Int64 = 0_i64, a3 : Int64 = 0_i64, a4 : Int64 = 0_i64, a5 : Int64 = 0_i64, a6 : Int64 = 0_i64) : Int64
Source
read(fd : Int32, buffer : Pointer(UInt8), count : Int) : Int32
Source
reset_child_signal_state
Source
setpgid(pid : Int32, pgrp : Int32) : Nil
Source
setsid
Source
sleep_ms(timeout_ms : Int32) : Nil
Source
wait4(pid : Int32, options : Int32 = 0) : Tuple(Int32, Int32)
Source
waitid(id_type : Int32, id : Int32, options : Int32)
Source
write(fd : Int32, buffer : Pointer(UInt8), count : Int) : Int32
Source
write(fd : Int32, data : String) : Int32
Source
write(fd : Int32, data : Bytes) : Int32
Source

Macros

def_syscall(name, nr, *args, returns = Int32, generic = nil, op = nil, fd = nil, path = nil, request = nil, linux_only = false, darwin_only = false)
Source

Nested types