Skip to content

Commit

Permalink
Merge bitcoin#17184: util: Filter out macOS process serial number
Browse files Browse the repository at this point in the history
b5f0be3 util: Filter out macOS process serial number (Hennadii Stepanov)

Pull request description:

  Fix bitcoin#17179

ACKs for top commit:
  laanwj:
    ACK b5f0be3
  MarcoFalke:
    unsigned ACK b5f0be3
  promag:
    ACK b5f0be3.
  fanquake:
    ACK b5f0be3 - Tested that this fixes bitcoin#17179.

Tree-SHA512: 84ce859e53ebc7ad2d0a45e954243ef6efee640f1e0212322f68a317e4361a216ecb4b5a3a410ab31613adc285c8d3840fbf41fa9da9019be3d734db6b9427cd
  • Loading branch information
fanquake committed Oct 18, 2019
2 parents fd3b4e4 + b5f0be3 commit b6e34af
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/util/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,15 @@ bool ArgsManager::ParseParameters(int argc, const char* const argv[], std::strin

for (int i = 1; i < argc; i++) {
std::string key(argv[i]);

#ifdef MAC_OSX
// At the first time when a user gets the "App downloaded from the
// internet" warning, and clicks the Open button, macOS passes
// a unique process serial number (PSN) as -psn_... command-line
// argument, which we filter out.
if (key.substr(0, 5) == "-psn_") continue;
#endif

if (key == "-") break; //bitcoin-tx using stdin
std::string val;
size_t is_index = key.find('=');
Expand Down

0 comments on commit b6e34af

Please sign in to comment.