Skip to content

Commit 2cfbaf1

Browse files
: process: fix cleanup race; avoid unwrap
Summary: postfix [this review comment](https://www.internalfb.com/diff/D80022315?dst_version_fbid=791689237351474&transaction_fbid=2649592828720268) from D80022315 - avoid `unwrap()` when pid retrieval fails Differential Revision: D80262763
1 parent ba2a023 commit 2cfbaf1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hyperactor_mesh/src/alloc/process.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ impl Child {
180180
stderr_tee,
181181
);
182182

183-
let process_pid = Arc::new(std::sync::Mutex::new(Some(process.id().unwrap() as i32)));
183+
let process_pid = Arc::new(std::sync::Mutex::new(process.id().map(|id| id as i32)));
184184

185185
let child = Self {
186186
local_rank,

0 commit comments

Comments
 (0)