Age | Commit message (Collapse) | Author |
|
|
|
|
|
1189: Derive `Ord`, `PartialOrd` for `Pid` r=posborne a=ranweiler
Closes #1188.
Co-authored-by: Joe Ranweiler <joe@lemma.co>
|
|
|
|
1163: Add setfsuid and setfsgid implementation for filesystem checks r=asomers a=gliderkite
I noticed that the filesystem checks API `setfsuid` and `setfsgid` where missing (while available in `libc`). This PR adds the implementation for both of them.
Co-authored-by: Marco Conte <gliderkite@gmail.com>
|
|
|
|
1187: Make FsType's raw type public r=asomers a=MikailBag
# Motivation
Currently, `FsType` API is limited. In fact, only operation is supports is comparison with one of well-known IDs.
But:
* This list is incomplete. For example, it misses cgroupfs and cgroup2fs.
* This approach doesn't work with custom FSs.
Co-authored-by: Mikail Bagishov <bagishov.mikail@yandex.ru>
|
|
|
|
1185: Provide clearenv() r=asomers a=jgallagher
Maybe closes #481.
"Maybe" for a couple reasons that are discussed on that issue:
* The issue mentions adding the other environment-variable-related functions (`setenv`, `getenv`, etc.), but I omitted those because they're already covered by `std::env` AFAICT, plus they're wildly unthreadsafe. It looks like `std::env` avoids the thread unsafety via a library-level lock and a warning to be careful when using ffi functions that might modify the environment concurrently.
* I opted to return `Error::UnsupportedOperation` in the (impossible?) case of `libc::clearenv()` returning non-zero instead of having the function return a `Result<(), ()>`. The latter seems like it would be onerous (since every other possibly-failing function in nix returns a `nix::Result`), but if you'd prefer a different error return I'm not going to put up any argument.
Co-authored-by: John Gallagher <jgallagher@bignerdranch.com>
|
|
|
|
|
|
1176: Add RISC-V support on GNU/Linux r=asomers a=msizanoen1
Co-authored-by: msizanoen1 <qtmlabs@protonmail.com>
|
|
1181: ioctl: Fix broken link to the kernel documentation r=asomers a=laarmen
The file documenting ioctl number assignment in the Linux kernel has been converted to ReStructuredText (see https://lwn.net/Articles/705224/ for some background), the file extension has naturally changed.
Co-authored-by: Simon Chopin <chopin.simon@gmail.com>
|
|
The file documenting ioctl number assignment in the Linux kernel has been converted to ReStructuredText (see https://lwn.net/Articles/705224/ for some background), the file extension has naturally changed.
|
|
1177: Add CLK_TCK to SysconfVar r=asomers a=cjbassi
http://man7.org/linux/man-pages/man3/sysconf.3.html says that the
corresponding variable is obsolete, but I think that just means the
constant defined in limits.h is obsolete. Checking the value using
sysconf is still valid.
Co-authored-by: Caleb Bassi <calebjbassi@gmail.com>
|
|
http://man7.org/linux/man-pages/man3/sysconf.3.html says that the
corresponding variable is obsolete, but I think that just means the
constant defined in limits.h is obsolete. Checking the value using
sysconf is still valid.
|
|
|
|
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>
|