Age | Commit message (Collapse) | Author |
|
1175: Remove deprecated Error::description r=asomers a=AnderEnder
`Error::description` has been documented as soft-deprecated since 1.27.0 (17 months ago). It is going to be hard-deprecated soon.
This PR:
- Removes all implementations of `description` in all error types
Related PR: https://github.com/rust-lang/rust/pull/66919
Co-authored-by: Radyk Andrii <ander.ender@gmail.com>
|
|
|
|
1172: Bitflags 1.1 r=asomers a=asomers
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
This prevents warnings about "try! is deprecated" when using the latest
compiler and -Zminimal_versions.
|
|
|
|
|
|
1168: Fix the build on OpenBSD. r=asomers a=asomers
We were assuming the wrong types for f_iosize and f_ffree in struct
statfs on OpenBSD.
Fixes #1125
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
We were assuming the wrong types for f_iosize and f_ffree in struct
statfs on OpenBSD.
Fixes #1125
|
|
I suspect that the segfault is due to a stack overflow on musl's signal
stack, but I can't reproduce the failure locally.
Fixes #1169
|
|
|
|
1162: Release v0.16.0 r=asomers a=asomers
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
|
|
|
|
1160: Various minor fixups r=asomers a=asomers
Fix various minor TODOs and FIXMEs in the code.
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
|
|
|
|
ignore really is the correct things to do for these doc tests.
compile_fail should only be used for examples that demonstrate a compile
failure by design, not for stuff that only works on one platform.
|
|
1159: impl TryFrom<libc::speed_t> for BaudRate r=asomers a=asomers
The old From implementation was actually falliable, and would panic on
failure.
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
The old From implementation was actually falliable, and would panic on
failure.
|
|
1157: Fix some race conditions in the integration tests r=asomers a=asomers
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
|
|
|
|
1158: Remove the last use of mem::uninitialized r=asomers a=asomers
Replace it with mem::zeroed. It isn't perfect, but it's better than it
was.
Issue #1115
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
Replace it with mem::zeroed. It isn't perfect, but it's better than it
was.
Issue #1115
|
|
1156: Remove the deprecated CmsgSpace r=asomers a=asomers
This eliminates one of the last remaining uninitialized memory accesses
in Nix.
Fixes #1142
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
1083: Allow signal injection in ptrace::syscall and ptrace::detach r=asomers a=frangio
Fixes #1049
Should I add tests for this functionality?
By the way, I noticed that the BSD module doesn't have `ptrace::syscall`. I couldn't find a reason behind this in #949. Should we add it?
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
|
|
This eliminates one of the last remaining uninitialized memory accesses
in Nix.
Fixes #1142
|
|
|
|
1148: Implement sched::sched_getaffinity() r=asomers a=thib-ack
Hello,
I found the function `sched::sched_setaffinity()` but I also needed to get the process affinity and I did not find the function `sched::sched_getaffinity()`
So I added the function which maps [sched_getaffinity(2)](https://linux.die.net/man/2/sched_getaffinity) which "get a process's CPU affinity mask" to the sched.rs file.
I hope the code match your guidelines (returned `Result<CpuSet>` instead of pointer parameter)
If that's not the case, tell me, I will fix asap.
I hope this will help !
Thanks,
Thibaut
Co-authored-by: Thibaut Ackermann <thibaut@ackermann.dev>
|
|
sched_getaffinity(2) get a process's CPU affinity mask
|
|
1154: ptrace: add ptrace::seize for Linux r=asomers a=jsgf
Co-authored-by: Jeremy Fitzhardinge <jeremy@goop.org>
|
|
|
|
1101: Implment linkat r=asomers a=jlb6740
This adds the linkat function which is part of POSIX:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/linkat.html
and widely implmented on Unix-Family platforms.
Co-authored-by: Johnnie Birch <45402135+jlb6740@users.noreply.github.com>
|
|
This adds the linkat function which is part of POSIX:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/linkat.html
and widely implmented on Unix-Family platforms.
Add back trailing whitespace removed on previous force push
|
|
1151: sys: termios: Fix inverted logic for [cfg()] conditional for sparc64 r=asomers a=glaubitz
The fix for #1149 has the logic for the [cfg()] conditional inverted
so that the aliases for VMIN and VTIME are defined on targets that
are not linux-sparc64.
Co-authored-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
|
|
|
|
1152: Fix a warning with the latest nightly compiler r=asomers a=asomers
The latest compiler warns about unnecessary parentheses in a position
that previous compilers ignored.
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
The latest compiler warns about unnecessary parentheses in a position
that previous compilers ignored.
|
|
The fix for #1149 has the logic for the [cfg()] conditional inverted
so that the aliases for VMIN and VTIME are defined on targets that
are not linux-sparc64.
|
|
1139: Add `Users` and `Group` related functions r=asomers a=otavio
This was a collaborative work between Johannes Schilling
<dario@deaktualisierung.org>, Fredrick Brennan <copypaste@kittens.ph>
and myself.
This PR is a split-off from #864 so we merge ready parts first. Next, we work on the iterators.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Co-authored-by: Otavio Salvador <otavio@ossystems.com.br>
|
|
1150: sys: termios: Define VMIN and VTIME as VEOF and VEOL on sparc64 r=asomers a=glaubitz
On sparc64, glibc defines VMIN as VEOF and VTIME as VEOL for
termios, so we need to inherit these alias definitions for
nix-rust as well.
Fixes #1149
Co-authored-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
|
|
On sparc64, glibc defines VMIN as VEOF and VTIME as VEOL for
termios, so we need to inherit these alias definitions for
nix-rust as well.
Fixes #1149
|
|
This was a collaborative work between Johannes Schilling
<dario@deaktualisierung.org>, Fredrick Brennan <copypaste@kittens.ph>
and myself.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
|
|
1138: Add Signal::as_str() to get representation as static string r=asomers a=MikailBag
# Motivation
Currently string representation of signal can be obtained with AsRef<str> impl.
But it has downside: returned string's lifetime is bound to lifetime of signal, so &str must be converted to String. This allocation is avoidable, because as_ref() only returns static strings. To fix this problem, my PR adds Signal::as_str() method, which returns static string.
Co-authored-by: Mikail Bagishov <bagishov.mikail@yandex.ru>
|
|
|
|
1145: Fix sys::socket::recvfrom for TCP sockets r=asomers a=asomers
recvfrom(2) only returns the sender's address for protocols that provide
it. Usually, that means it returns the sender's address for datagram
sockets but not for stream sockets.
Fixes #1144
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
recvfrom(2) only returns the sender's address for protocols that provide
it. Usually, that means it returns the sender's address for datagram
sockets but not for stream sockets.
Fixes #1144
|
|
1141: Fix typo in Gid::effective() docstring r=asomers a=scottschroeder
- docstring now matches the actual `getegid()` call
Co-authored-by: Scott Schroeder <scottschroeder@users.noreply.github.com>
|
|
|
|
1137: Rustup minimal r=posborne a=asomers
Fix CI on FreeBSD after rustup 1.20.0.
Co-authored-by: Alan Somers <asomers@gmail.com>
|