Skip to content

Commit

Permalink
Add PapersPlease to processes that need a fixed getpid() result
Browse files Browse the repository at this point in the history
  • Loading branch information
clementgallet committed Jul 21, 2021
1 parent 113734a commit d2c3eb0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
### Changed
### Fixed

* Fix variable RNG seed in Papers Please (#422)

## [1.4.2] - 2021-07-06
### Added

Expand Down
2 changes: 1 addition & 1 deletion src/library/systemwrappers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ DEFINE_ORIG_POINTER(fork)
void* return_address = __builtin_return_address(0);
char** symbols = backtrace_symbols(&return_address, 1);
if (symbols != nullptr) {
if (strstr(symbols[0], "libhl.so"))
if (strstr(symbols[0], "libhl.so") || strstr(symbols[0], "PapersPlease(+0x"))
pid = 1234;
free(symbols);
}
Expand Down

0 comments on commit d2c3eb0

Please sign in to comment.