Age | Commit message (Collapse) | Author |
|
cc #664 (unsure if this is everything needed)
|
|
The libc_bitflags! macro was replaced with a non-recursive one supporting
only public structs. I could not figure out how to make the old macro work
with the upgrade, so I reworked part of the bitflags! macro directly to suit
our needs, much as the original recursive macro was made. There are no uses
of this macro for non-public structs, so this is not a problem for internal code.
|
|
This adds execveat() to `nix::unistd`. It uses the execveat(2) Linux
kernel syscall, which is available since 3.19.
This is a Linux-specific extension which is not covered by POSIX and
does not have any userland libc wrapper.
Ref: http://man7.org/linux/man-pages/man2/execveat.2.html
|
|
|
|
|
|
|
|
Don't need to call as_c_str()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
But leave in place Linux links for non-standard functions. Also, add
brief docs for some functions that were lacking them.
|
|
This module merely contained FFI declarations, and only enough to
implement memfd_create() and pivot_root() wrapper functions in
nix. Since these declarations are redundant with equivalent FFI
declarations in libc, we'll remove them here. In the future, any
syscall-related wrapper function will be implemented directly and
utilize libc for FFI declarations as we cannot generically expose
a type-safe `syscall()` because of its variadic argument list.
|
|
This adds fexecve() to `nix::unistd`. It is available in libc since 0.2.29.
Ref: http://pubs.opengroup.org/onlinepubs/9699919799/functions/fexecve.html
|
|
Changed SeekData and SeekHole hardcoded values to libc ones and
added availability only to linux freebsd and dragonflybsd.
Removed impl Whence and assigned the libc values directly in the enum definition.
|
|
|
|
Some tests were invoking non-async-signal-safe functions from the child
process after a `fork`. Since they might be invoked in parallel, this
could lead to problems.
|
|
It was broken when enabled, and currently the libc definition is only
available for windows. This will be re-added when a new libc is released
that supports it across all available platforms
|
|
677: PtyMaster::drop should panic on EBADF r=asomers
Fixes #659
|
|
Also, document the double-close risk with unistd::close
Fixes #659
|
|
630: Add wrappers for sysconf(3), pathconf(2), and fpathconf(2) r=asomers
|
|
|
|
|
|
|
|
This introduces a wrapper for fchdir(2), allowing a process to change
directory based on an open file descriptor.
The underlying function is available in libc crate since 0.2.20.
|
|
Baed on discussions on the related PR, sethostname now takes
an `S: AsRef<OsStr>` in order to allow for a greater range of inputs
that allow for a more fluid interface.
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Previously gethostname just mutated a buffer. We now provide
a slightly more usable (but still allocation free) API that ensures
that the returned buffer is NUL-terminated. We give back a `&CStr`
instead of requiring that the user do all of the conversions from
`&[u8]` when we know we are dealing with a `&CStr`.
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Although the underlying C API does take a pointer to a set of
characters, it is a requirement of almost every operating system
that these bytes not contain a premature NUL character or other
special characters. In other words, you want a `&str`. Changing
this to make the API make a bit more sense.
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
These make the language consistent in the 3rd person, fix a few
minor mistakes, and remove some superflous prose.
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
The previous one was entirely too generic.
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Documentation improvements
This series of commits starts to fill in documentation that was not previously present for various calls, mostly in unistd for this pass.
r? @kamalmarhubi
|
|
|
|
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
This is a logical companion to setpgid, so adding an implementation.
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|