<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/library/std/src/sys/process, branch beta</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=beta</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=beta'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-08-30T18:07:09+00:00</updated>
<entry>
<title>Fix spurious test timeout</title>
<updated>2025-08-30T18:07:09+00:00</updated>
<author>
<name>Chris Denton</name>
<email>chris@chrisdenton.dev</email>
</author>
<published>2025-08-30T12:07:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3516e25eedcf7438e04b6c1f5a7a926ac2c893bc'/>
<id>urn:sha1:3516e25eedcf7438e04b6c1f5a7a926ac2c893bc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>library: Migrate from `cfg_if` to `cfg_select`</title>
<updated>2025-08-16T12:28:31+00:00</updated>
<author>
<name>Josh Triplett</name>
<email>josh@joshtriplett.org</email>
</author>
<published>2025-08-10T21:25:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1ae4a0cc3487f28b29f36afe8056535afad21e7b'/>
<id>urn:sha1:1ae4a0cc3487f28b29f36afe8056535afad21e7b</id>
<content type='text'>
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):

```
'&lt;,'&gt;s/\(cfg_if::\)\?cfg_if/cfg_select/ | '&lt;,'&gt;s/^\( *\)} else {/\1}\r\1_ =&gt; {/c | '&lt;,'&gt;s/^\( *\)} else if #\[cfg(\(.*\))\] /\1}\r\1\2 =&gt; /e | '&lt;,'&gt;s/if #\[cfg(\(.*\))\] {/\1 =&gt; {/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.
</content>
</entry>
<entry>
<title>Replace unsafe function with safe alternative</title>
<updated>2025-08-09T07:05:12+00:00</updated>
<author>
<name>Chris Denton</name>
<email>chris@chrisdenton.dev</email>
</author>
<published>2025-08-09T07:02:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=89b366955ecab610dd6392e183e83600bc02ba11'/>
<id>urn:sha1:89b366955ecab610dd6392e183e83600bc02ba11</id>
<content type='text'>
The `security_attributes` function is marked as safe despite taking a raw pointer which will later be used. Fortunately this function is only used internally and only in one place that has been basically the same for a decade now.

However, we only ever set one bool so it's easy enough to replace with something that's actually safe.
</content>
</entry>
<entry>
<title>Rollup merge of #142391 - LevitatingBusinessMan:setsid, r=workingjubilee</title>
<updated>2025-07-11T05:35:17+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>476013+matthiaskrgr@users.noreply.github.com</email>
</author>
<published>2025-07-11T05:35:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2730bebbf88ae9473b339bb7f66eb77fb2c9fa6f'/>
<id>urn:sha1:2730bebbf88ae9473b339bb7f66eb77fb2c9fa6f</id>
<content type='text'>
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(&amp;mut self, setsid: bool) -&gt; &amp;mut Command`.
</content>
</entry>
<entry>
<title>rust: library: Add setsid method to CommandExt trait</title>
<updated>2025-07-10T03:26:58+00:00</updated>
<author>
<name>LevitatingBusinessMan (Rein Fernhout)</name>
<email>me@levitati.ng</email>
</author>
<published>2025-06-12T00:34:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e0f76871eddd0f1345eba7d09e5ab4812f8aa91d'/>
<id>urn:sha1:e0f76871eddd0f1345eba7d09e5ab4812f8aa91d</id>
<content type='text'>
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 &lt;harveyhunt@fb.com&gt;
</content>
</entry>
<entry>
<title>update internal `send_signal` comment</title>
<updated>2025-06-27T10:24:42+00:00</updated>
<author>
<name>Deadbeef</name>
<email>ent3rm4n@gmail.com</email>
</author>
<published>2025-06-27T10:24:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7a79454de465774f8445a88640ffdc5792fc8a13'/>
<id>urn:sha1:7a79454de465774f8445a88640ffdc5792fc8a13</id>
<content type='text'>
</content>
</entry>
<entry>
<title>add ChildExt(::send_signal)</title>
<updated>2025-06-18T04:38:55+00:00</updated>
<author>
<name>Jeremy Smart</name>
<email>jeremy3141592@gmail.com</email>
</author>
<published>2025-06-18T04:38:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b3914945ae2d77770c25ed124a8450d82c8f7fe9'/>
<id>urn:sha1:b3914945ae2d77770c25ed124a8450d82c8f7fe9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>std: add safety comments to `CStringArray`</title>
<updated>2025-05-23T15:09:02+00:00</updated>
<author>
<name>joboet</name>
<email>jonasboettiger@icloud.com</email>
</author>
<published>2025-04-21T13:57:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=89a90d664082280584a27cc8030aba85d122448f'/>
<id>urn:sha1:89a90d664082280584a27cc8030aba85d122448f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>std: fix aliasing bug in UNIX process implementation</title>
<updated>2025-05-23T15:09:00+00:00</updated>
<author>
<name>joboet</name>
<email>jonasboettiger@icloud.com</email>
</author>
<published>2025-03-24T17:12:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a467516c2208474ec21b0ea139c45f7d41cbad7e'/>
<id>urn:sha1:a467516c2208474ec21b0ea139c45f7d41cbad7e</id>
<content type='text'>
`CStringArray` contained both `CString`s and their pointers. Unfortunately, since `CString` uses `Box`, moving the `CString`s into the `Vec` can (under stacked borrows) invalidate the pointer to the string, meaning the resulting `Vec&lt;*const c_char&gt;` was, from an opsem perspective, unusable. This PR removes removes the `Vec&lt;CString&gt;` from `CStringArray`, instead recreating the `CString`/`CStr` from the pointers when necessary. Also,`CStringArray` is now used for the process args as well, the old implementation was suffering from the same kind of bug.
</content>
</entry>
<entry>
<title>Add `std::os::unix::process::CommandExt::chroot` to safely chroot a child process</title>
<updated>2025-05-20T16:25:05+00:00</updated>
<author>
<name>Josh Triplett</name>
<email>josh@joshtriplett.org</email>
</author>
<published>2025-02-27T22:00:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a3cf6f640828647e34afe96a626b3b4f6bbb22b1'/>
<id>urn:sha1:a3cf6f640828647e34afe96a626b3b4f6bbb22b1</id>
<content type='text'>
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 "/".
</content>
</entry>
</feed>
