File tree Expand file tree Collapse file tree
lib/wasix/src/syscalls/wasix Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ pub fn proc_exec3<M: MemorySize>(
207207 ctx. data_mut ( ) . swap_inner ( & mut vfork. env ) ;
208208 std:: mem:: swap ( ctx. data_mut ( ) , & mut vfork. env ) ;
209209
210- assert ! ( ! vfork. env. context_switching_environment. is_some ( ) ) ;
210+ assert ! ( vfork. env. context_switching_environment. is_none ( ) ) ;
211211 assert ! ( ctx. data( ) . context_switching_environment. is_some( ) ) ;
212212 // Jump back to the vfork point and current on execution
213213 // note: fork does not return any values hence passing `()`
Original file line number Diff line number Diff line change @@ -32,15 +32,14 @@ pub fn proc_fork<M: MemorySize>(
3232 Errno :: Notsup
3333 } ) ) ;
3434
35- if let Some ( context_switching_environment) = ctx. data ( ) . context_switching_environment . as_ref ( ) {
36- if context_switching_environment. active_context_id ( )
35+ if let Some ( context_switching_environment) = ctx. data ( ) . context_switching_environment . as_ref ( )
36+ && context_switching_environment. active_context_id ( )
3737 != context_switching_environment. main_context_id ( )
38- {
39- warn ! (
40- "process forking is only supported from the main context when using WASIX context-switching features"
41- ) ;
42- return Ok ( Errno :: Notsup ) ;
43- }
38+ {
39+ warn ! (
40+ "process forking is only supported from the main context when using WASIX context-switching features"
41+ ) ;
42+ return Ok ( Errno :: Notsup ) ;
4443 }
4544
4645 // If we were just restored then we need to return the value instead
You can’t perform that action at this time.
0 commit comments