-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't call
getenv
in side threads (#984)
Summary: Calling `getenv` on side threads is dangerous as it can potentially segfault if the main thread is in the middle of setting environment variables: pytorch/pytorch#134596 This PR only calls `getenv` only once during the first call of `isDaemonEnvVarSet()`, which is called from `init`. Pull Request resolved: #984 Reviewed By: sraikund16 Differential Revision: D62152169 Pulled By: malfet fbshipit-source-id: 28dff07cb9775b004580749805b6437dba978eeb Co-authored-by: Nikita Shulga <[email protected]>
- Loading branch information
1 parent
b5c85da
commit 86f1deb
Showing
3 changed files
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters