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 @@ -83,7 +83,7 @@ pub enum WaitStatus {
83
83
/// child process. This is only returned if `WaitPidFlag::WNOHANG`
84
84
/// was used (otherwise `wait()` or `waitpid()` would block until
85
85
/// there was something to report).
86
- StillAlive
86
+ StillAlive ,
87
87
}
88
88
89
89
impl WaitStatus {
@@ -149,7 +149,7 @@ fn continued(status: i32) -> bool {
149
149
unsafe { libc:: WIFCONTINUED ( status) }
150
150
}
151
151
152
- fn decode ( pid : Pid , status : i32 ) -> WaitStatus {
152
+ fn decode ( pid : Pid , status : i32 ) -> WaitStatus {
153
153
if exited ( status) {
154
154
WaitStatus :: Exited ( pid, exit_status ( status) )
155
155
} else if signaled ( status) {
@@ -187,10 +187,16 @@ pub fn waitpid<P: Into<Option<Pid>>>(pid: P, options: Option<WaitPidFlag>) -> Re
187
187
188
188
let option_bits = match options {
189
189
Some ( bits) => bits. bits ( ) ,
190
- None => 0
190
+ None => 0 ,
191
191
} ;
192
192
193
- let res = unsafe { libc:: waitpid ( pid. into ( ) . unwrap_or ( Pid :: from_raw ( -1 ) ) . into ( ) , & mut status as * mut c_int , option_bits) } ;
193
+ let res = unsafe {
194
+ libc:: waitpid (
195
+ pid. into ( ) . unwrap_or ( Pid :: from_raw ( -1 ) ) . into ( ) ,
196
+ & mut status as * mut c_int ,
197
+ option_bits,
198
+ )
199
+ } ;
194
200
195
201
Ok ( match try!( Errno :: result ( res) ) {
196
202
0 => StillAlive ,
You can’t perform that action at this time.
0 commit comments