Skip to content

Commit 09ed83d

Browse files
committed
Add dummy ExitStatus struct.
1 parent 77b85ce commit 09ed83d

File tree

1 file changed

+38
-3
lines changed

1 file changed

+38
-3
lines changed

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

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
1+
use crate::fmt;
12
use crate::io;
23
use crate::sys::process::process_common::*;
34
use crate::sys::{unsupported, unsupported_err, Void};
45

6+
use libc::c_int;
7+
58
////////////////////////////////////////////////////////////////////////////////
69
// Command
710
////////////////////////////////////////////////////////////////////////////////
811

912
impl Command {
10-
pub fn spawn(&mut self, _default: Stdio, _needs_stdin: bool)
11-
-> io::Result<(Process, StdioPipes)> {
13+
pub fn spawn(
14+
&mut self,
15+
_default: Stdio,
16+
_needs_stdin: bool,
17+
) -> io::Result<(Process, StdioPipes)> {
1218
unsupported()
1319
}
1420

@@ -40,4 +46,33 @@ impl Process {
4046
pub fn try_wait(&mut self) -> io::Result<Option<ExitStatus>> {
4147
match self.0 {}
4248
}
43-
}
49+
}
50+
51+
#[derive(PartialEq, Eq, Clone, Copy, Debug)]
52+
pub struct ExitStatus(Void);
53+
54+
impl ExitStatus {
55+
pub fn success(&self) -> bool {
56+
match self.0 {}
57+
}
58+
59+
pub fn code(&self) -> Option<i32> {
60+
match self.0 {}
61+
}
62+
63+
pub fn signal(&self) -> Option<i32> {
64+
match self.0 {}
65+
}
66+
}
67+
68+
impl From<c_int> for ExitStatus {
69+
fn from(a: c_int) -> ExitStatus {
70+
unimplemented!()
71+
}
72+
}
73+
74+
impl fmt::Display for ExitStatus {
75+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
76+
match self.0 {}
77+
}
78+
}

0 commit comments

Comments
 (0)