Skip to content

Commit 7eda531

Browse files
process: fix cleanup race; avoid unwrap (#875)
Summary: Pull Request resolved: #875 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 Reviewed By: highker Differential Revision: D80262763 fbshipit-source-id: 510ce4af62cf4e2bf3852cfb54862ce1f9f02497
1 parent 09bddbb commit 7eda531

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)