pub fn store_pty_returncode(returncode: &Arc<Mutex<Option<i32>>>, code: i32)
Store the PTY child return code in shared process state.