summaryrefslogtreecommitdiffstats
path: root/library/std/src/process.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
commitd1b2d29528b7794b41e66fc2136e395a02f8529b (patch)
treea4a17504b260206dec3cf55b2dca82929a348ac2 /library/std/src/process.rs
parentReleasing progress-linux version 1.72.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.tar.xz
rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.zip
Merging upstream version 1.73.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'library/std/src/process.rs')
-rw-r--r--library/std/src/process.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/library/std/src/process.rs b/library/std/src/process.rs
index 8f3201b00..7380b45b0 100644
--- a/library/std/src/process.rs
+++ b/library/std/src/process.rs
@@ -280,6 +280,7 @@ impl Write for ChildStdin {
io::Write::is_write_vectored(&&*self)
}
+ #[inline]
fn flush(&mut self) -> io::Result<()> {
(&*self).flush()
}
@@ -299,6 +300,7 @@ impl Write for &ChildStdin {
self.inner.is_write_vectored()
}
+ #[inline]
fn flush(&mut self) -> io::Result<()> {
Ok(())
}
@@ -558,6 +560,14 @@ impl Command {
/// but this has some implementation limitations on Windows
/// (see issue #37519).
///
+ /// # Platform-specific behavior
+ ///
+ /// Note on Windows: For executable files with the .exe extension,
+ /// it can be omitted when specifying the program for this Command.
+ /// However, if the file has a different extension,
+ /// a filename including the extension needs to be provided,
+ /// otherwise the file won't be found.
+ ///
/// # Examples
///
/// Basic usage:
@@ -1524,6 +1534,15 @@ impl From<fs::File> for Stdio {
#[stable(feature = "process", since = "1.0.0")]
pub struct ExitStatus(imp::ExitStatus);
+/// The default value is one which indicates successful completion.
+#[stable(feature = "process-exitcode-default", since = "1.73.0")]
+impl Default for ExitStatus {
+ fn default() -> Self {
+ // Ideally this would be done by ExitCode::default().into() but that is complicated.
+ ExitStatus::from_inner(imp::ExitStatus::default())
+ }
+}
+
/// Allows extension traits within `std`.
#[unstable(feature = "sealed", issue = "none")]
impl crate::sealed::Sealed for ExitStatus {}