Skip to content

Commit 6c67a76

Browse files
committed
pre_exec: expand docs
1 parent cbbf8a7 commit 6c67a76

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/libstd/sys/redox/ext/process.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ pub trait CommandExt {
4848
/// This also means that all resources such as file descriptors and
4949
/// memory-mapped regions got duplicated. It is your responsibility to make
5050
/// sure that the closure does not violate library invariants by making
51-
/// invalid use of these duplicates.
51+
/// invalid use of these duplicates. Moreover, POSIX demands that you only
52+
/// perform operations that are explicitly documented as async-signal-safe.
5253
///
5354
/// When this closure is run, aspects such as the stdio file descriptors and
5455
/// working directory have successfully been changed, so output to these
@@ -60,8 +61,8 @@ pub trait CommandExt {
6061
/// Schedules a closure to be run just before the `exec` function is
6162
/// invoked.
6263
///
63-
/// This method should be unsafe, so it got deprecated in favor of the
64-
/// unsafe [`pre_exec`].
64+
/// This method is stable and usable, but it should be unsafe. To fix
65+
/// that, it got deprecated in favor of the unsafe [`pre_exec`].
6566
///
6667
/// [`pre_exec`]: #tymethod.pre_exec
6768
#[stable(feature = "process_exec", since = "1.15.0")]

src/libstd/sys/unix/ext/process.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ pub trait CommandExt {
4848
/// This also means that all resources such as file descriptors and
4949
/// memory-mapped regions got duplicated. It is your responsibility to make
5050
/// sure that the closure does not violate library invariants by making
51-
/// invalid use of these duplicates.
51+
/// invalid use of these duplicates. Moreover, POSIX demands that you only
52+
/// perform operations that are explicitly documented as async-signal-safe.
5253
///
5354
/// When this closure is run, aspects such as the stdio file descriptors and
5455
/// working directory have successfully been changed, so output to these
@@ -60,8 +61,8 @@ pub trait CommandExt {
6061
/// Schedules a closure to be run just before the `exec` function is
6162
/// invoked.
6263
///
63-
/// This method should be unsafe, so it got deprecated in favor of the
64-
/// unsafe [`pre_exec`].
64+
/// This method is stable and usable, but it should be unsafe. To fix
65+
/// that, it got deprecated in favor of the unsafe [`pre_exec`].
6566
///
6667
/// [`pre_exec`]: #tymethod.pre_exec
6768
#[stable(feature = "process_exec", since = "1.15.0")]

0 commit comments

Comments
 (0)