| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
Add socket extensions for cygwin
r? `@joboet`
* Abstract name uds addr
* quickack
* passcred
|
|
|
|
Add `read_buf` equivalents for positioned reads
Adds the following items under the ~~`read_buf` (rust-lang/rust#78485)~~ `read_buf_at` (rust-lang/rust#140771) feature:
- `std::os::unix::fs::FileExt::read_buf_at`
- `std::os::unix::fs::FileExt::read_buf_exact_at`
- `std::os::windows::fs::FileExt::seek_read_buf`
try-job: `x86_64-msvc*`
try-job: `test-various*`
try-job: `dist-various*`
|
|
Adds the following items under the `read_buf_at` feature:
- `std::os::unix::fs::FileExt::read_buf_at`
- `std::os::unix::fs::FileExt::read_buf_exact_at`
- `std::os::windows::fs::FileExt::seek_read_buf`
|
|
Migrate the standard library from using the external `cfg_if` crate to
using the now-built-in `cfg_select` macro.
This does not yet eliminate the dependency from
`library/std/Cargo.toml`, because while the standard library itself no
longer uses `cfg_if`, it also incorporates the `backtrace` crate, which
does.
Migration assisted by the following vim command (after selecting the
full `cfg_if!` invocation):
```
'<,'>s/\(cfg_if::\)\?cfg_if/cfg_select/ | '<,'>s/^\( *\)} else {/\1}\r\1_ => {/c | '<,'>s/^\( *\)} else if #\[cfg(\(.*\))\] /\1}\r\1\2 => /e | '<,'>s/if #\[cfg(\(.*\))\] {/\1 => {/e
```
This is imperfect, but substantially accelerated the process. This
prompts for confirmation on the `} else {` since that can also appear
inside one of the arms. This also requires manual intervention to handle
any multi-line conditions.
|
|
rust: library: Add `setsid` method to `CommandExt` trait
Add a setsid method to the CommandExt trait so that callers can create a process in a new session and process group whilst still using the POSIX spawn fast path.
Tracking issue: rust-lang/rust#105376
ACP: https://github.com/rust-lang/libs-team/issues/184
This PR was previously submitted by ``@HarveyHunt`` (whom I marked as Co-Author in the commit message) in rust-lang/rust#105377. However that PR went stale.
I applied the [suggestion](https://github.com/rust-lang/rust/pull/105377/files/231d19fcbfe155b2e85116865adae4253380ff1f#r1893457943) to change the function signature to `fn setsid(&mut self, setsid: bool) -> &mut Command`.
|
|
Add a setsid method to the CommandExt trait so that callers can create
a process in a new session and process group whilst still using the
POSIX spawn fast path.
Co-Authored-By: Harvey Hunt <harveyhunt@fb.com>
|
|
|
|
Clarify doc comment on unix OpenOptions
|
|
#![feature(rustc_private)]
|
|
Set MSG_NOSIGNAL for UnixStream
https://github.com/rust-lang/rust/issues/139956
Same logic as for https://github.com/rust-lang/rust/blob/1f76d219c906f0112bb1872f33aa977164c53fa6/library/std/src/sys/net/connection/socket.rs#L399-L405.
|
|
r=ChrisDenton,tgross35
Implement send_signal for unix child processes
Tracking issue: rust-lang/rust#141975
There are two main differences between my implementation and the Public API section of the tracking issue. ~First, `send_signal` requires a mutable reference, like `Child::kill`.~ Second, `ChildExt` has `Sealed` as a supertrait, bringing it more in line with other extension traits like `CommandExt`.
try-job: `dist-various*`
try-job: `test-various*`
|
|
|
|
https://github.com/rust-lang/rust/issues/139956
fix
|
|
This allows UTF-8 characters to be printed without escapes, rather than
just ASCII.
|
|
Link `Command::current_dir`.
Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
|
|
|
|
|
|
process
This adds a `chroot` method to the `CommandExt` extension trait for the
`Command` builder, to set a directory to chroot into. This will chroot
the child process into that directory right before calling chdir for the
`Command`'s working directory.
To avoid allowing a process to have a working directory outside of the
chroot, if the `Command` does not yet have a working directory set,
`chroot` will set its working directory to "/".
|
|
fix doc for UnixStream
Doc example was using `UdpSocket` instead of `UnixStream`.
|
|
|
|
Tracking issue #139324
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
|
|
Add std support to cygwin target
|
|
Overhaul examples for PermissionsExt
This fixes #91707 by including one overarching example, instead of the small examples that can be misleading.
|
|
|
|
Signed-off-by: Ookiineko <chiisaineko@protonmail.com>
|
|
Use `std::mem::{size_of, size_of_val, align_of, align_of_val}` from the
prelude instead of importing or qualifying them.
These functions were added to all preludes in Rust 1.80.
|
|
|
|
This fixes #91707 by including one overarching example, instead of the small examples that can be misleading.
|
|
Expand std::os::unix::fs::chown() doc with a warning
Include warning about losing setuid/gid when chowning, per POSIX.
It is about the underlying system call but it is rather useful to mention it in the help in case someone accidentally forgets (don't look at me :)).
|
|
|
|
|
|
|
|
Make `std::os::darwin` public
I'm not sure of the reasoning behind them not being public before, but I think they should be, just like `std::os::ios` and `std::os::macos` are public.
Additionally, I've merged their source code, as it was otherwise just a bunch of unnecessary duplication.
Ultimately, I've done this PR to fix `./x build library --target=aarch64-apple-tvos,aarch64-apple-watchos,aarch64-apple-visionos`, as that currently fails because of dead code warnings.
Since you reviewed https://github.com/rust-lang/rust/pull/121419
r? davidtwco
Fixes https://github.com/rust-lang/rust/issues/121640.
`@rustbot` label O-tvos O-watchos O-visionos
|
|
|
|
|
|
Use `mem::offset_of!` for `sockaddr_un.sun_path`
We don't need manual pointer math here anymore!
try-job: dist-i686-msvc
|
|
|
|
Since the stabilization in #127679 has reached stage0, 1.82-beta, we can
start using `&raw` freely, and even the soft-deprecated `ptr::addr_of!`
and `ptr::addr_of_mut!` can stop allowing the unstable feature.
I intentionally did not change any documentation or tests, but the rest
of those macro uses are all now using `&raw const` or `&raw mut` in the
standard library.
|
|
|
|
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
|
|
|
|
path
|
|
Bump boostrap compiler to new beta
Accidentally left some comments on the update cfgs commit directly xd
|
|
|
|
|
|
Linked to chown(2) manpage on the web which expands on chown call behaviour.
|
|
Include warning about losing setuid/gid when chowning, per POSIX.
|