File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ pub enum WaitStatus {
95
95
/// child process. This is only returned if `WaitPidFlag::WNOHANG`
96
96
/// was used (otherwise `wait()` or `waitpid()` would block until
97
97
/// there was something to report).
98
- StillAlive
98
+ StillAlive ,
99
99
}
100
100
101
101
impl WaitStatus {
@@ -161,7 +161,7 @@ fn continued(status: i32) -> bool {
161
161
unsafe { libc:: WIFCONTINUED ( status) }
162
162
}
163
163
164
- fn decode ( pid : Pid , status : i32 ) -> WaitStatus {
164
+ fn decode ( pid : Pid , status : i32 ) -> WaitStatus {
165
165
if exited ( status) {
166
166
WaitStatus :: Exited ( pid, exit_status ( status) )
167
167
} else if signaled ( status) {
@@ -199,10 +199,16 @@ pub fn waitpid<P: Into<Option<Pid>>>(pid: P, options: Option<WaitPidFlag>) -> Re
199
199
200
200
let option_bits = match options {
201
201
Some ( bits) => bits. bits ( ) ,
202
- None => 0
202
+ None => 0 ,
203
203
} ;
204
204
205
- let res = unsafe { libc:: waitpid ( pid. into ( ) . unwrap_or ( Pid :: from_raw ( -1 ) ) . into ( ) , & mut status as * mut c_int , option_bits) } ;
205
+ let res = unsafe {
206
+ libc:: waitpid (
207
+ pid. into ( ) . unwrap_or ( Pid :: from_raw ( -1 ) ) . into ( ) ,
208
+ & mut status as * mut c_int ,
209
+ option_bits,
210
+ )
211
+ } ;
206
212
207
213
Ok ( match try!( Errno :: result ( res) ) {
208
214
0 => StillAlive ,
You can’t perform that action at this time.
0 commit comments