Module libc/unistd
POSIX <unistd.h> — standard symbolic constants and types.
Stability
unstable — a raw C binding, not a Yo design, and POSIX-only: including
<unistd.h> on Windows does not compile, so every import must sit
inside a non-Windows comptime arm (tests/io/tty.test.yo did not, and
that was the bug — docs/en-US/STD_SYS_MODULE.md). The public surfaces
above it are std/fs, std/env and std/process; what they take is
narrow — getcwd / chdir / readlink for std/env, unlink /
rmdir for std/fs/temp. read / write / close are bound, but Yo
file I/O goes through the async runtime (std/sys/file), not these, so
a synchronous call here bypasses the event loop. Additive-by-demand,
follows POSIX.
Types
Functions
Parameters
| Name | Type | Notes |
|---|---|---|
fd | int | |
buf | *(void) | |
count | usize |
Returns: ssize_t
Parameters
| Name | Type | Notes |
|---|---|---|
fd | int | |
buf | *(void) | |
count | usize |
Returns: ssize_t
Parameters
| Name | Type | Notes |
|---|---|---|
fd | int |
Returns: int
Parameters
| Name | Type | Notes |
|---|---|---|
fd | int | |
offset | off_t | |
whence | int |
Returns: off_t
Parameters
| Name | Type | Notes |
|---|---|---|
pipefd | *(int) |
Returns: int
Parameters
| Name | Type | Notes |
|---|---|---|
oldfd | int |
Returns: int
Parameters
| Name | Type | Notes |
|---|---|---|
oldfd | int | |
newfd | int |
Returns: int
Parameters
| Name | Type | Notes |
|---|---|---|
pathname | *(char) | |
mode | int |
Returns: int
Parameters
| Name | Type | Notes |
|---|---|---|
pathname | *(char) |
Returns: int
Parameters
| Name | Type | Notes |
|---|---|---|
pathname | *(char) |
Returns: int
Parameters
| Name | Type | Notes |
|---|---|---|
path | *(char) |
Returns: int
Parameters
| Name | Type | Notes |
|---|---|---|
buf | *(char) | |
size | usize |
Returns: ?(*(char))
Parameters
| Name | Type | Notes |
|---|---|---|
pathname | *(char) | |
buf | *(char) | |
bufsiz | usize |
Returns: isize
Returns: pid_t
Parameters
| Name | Type | Notes |
|---|---|---|
pathname | *(char) | |
argv | *(*(char)) | |
envp | *(*(char)) |
Returns: int
Parameters
| Name | Type | Notes |
|---|---|---|
status | int |
Returns: unit
Returns: pid_t
Returns: pid_t
Returns: uid_t
Returns: uid_t
Returns: gid_t
Returns: gid_t
Parameters
| Name | Type | Notes |
|---|---|---|
seconds | u32 |
Returns: u32
Parameters
| Name | Type | Notes |
|---|---|---|
usec | u32 |
Returns: int
Constants
Value: <unknown: *(?(*(char)))>
Value: <unknown: int>
Value: <unknown: int>
Value: <unknown: int>
Value: <unknown: int>
Value: <unknown: int>
Value: <unknown: int>
Value: <unknown: int>