Crate libc [] [src]

Unstable (libc)

: use libc from crates.io

Reexports

pub use self::syscall::error::*;
pub use self::syscall::flag::*;

Structs

in6_addr [Unstable]
in_addr [Unstable]
sockaddr [Unstable]
sockaddr_in [Unstable]
sockaddr_in6 [Unstable]

Enums

c_void [Unstable]

Constants

AF_INET [Unstable]
AF_INET6 [Unstable]
STDERR_FILENO [Unstable]
STDIN_FILENO [Unstable]
STDOUT_FILENO [Unstable]

Statics

errno [Unstable]

Functions

chdir

Change the process's working directory

chmod
clock_gettime

Get the current system time

clone

Produce a fork of the current process, or a new process thread

close

Close a file

dup

Copy and transform a file descriptor

exec

Replace the current process with a new executable

exit

Exit the current process

fcntl

Register a file for event-based I/O

fpath

Retrieve the canonical path of a file

fstat

Get metadata about a file

fsync

Sync a file descriptor to its underlying medium

ftruncate

Truncate or extend a file to a specified length

futex

Fast userspace mutex - TODO: Document

getcwd

Get the current working directory

getpid

Get the current process ID

kill

Send a signal sig to the process identified by pid

lseek

Seek to offset bytes in a file descriptor

nanosleep

Sleep for the time specified in req

open

Open a file

pipe2

Create a pair of file descriptors referencing the read and write ends of a pipe

random [Unstable]

Get a pseudorandom integer.

read

Read from a file descriptor into a buffer

rmdir

Remove a directory

sbrk [Unstable]

Increment data segment of this process by some, n, return a pointer to the new data segment start.

sched_yield [Unstable]

Cooperatively gives up a timeslice to the OS scheduler.

setregid

Set the current process group IDs

setreuid

Set the current process user IDs

strlen [Unstable]
unlink

Remove a file

waitpid

Check if a child process has exited or received a signal

write

Write a buffer to a file descriptor

Type Definitions

c_char [Unstable]
c_double [Unstable]
c_float [Unstable]
c_int [Unstable]
c_long [Unstable]
c_longlong [Unstable]
c_schar [Unstable]
c_short [Unstable]
c_uchar [Unstable]
c_uint [Unstable]
c_ulong [Unstable]
c_ulonglong [Unstable]
c_ushort [Unstable]
gid_t [Unstable]
in_addr_t [Unstable]
in_port_t [Unstable]
int16_t [Unstable]
int32_t [Unstable]
int64_t [Unstable]
int8_t [Unstable]
intmax_t [Unstable]
intptr_t [Unstable]
mode_t [Unstable]
off_t [Unstable]
pid_t [Unstable]
ptrdiff_t [Unstable]
sa_family_t [Unstable]
size_t [Unstable]
socklen_t [Unstable]
ssize_t [Unstable]
stat [Unstable]
time_t [Unstable]
timespec [Unstable]
uid_t [Unstable]
uint16_t [Unstable]
uint32_t [Unstable]
uint64_t [Unstable]
uint8_t [Unstable]
uintmax_t [Unstable]
uintptr_t [Unstable]