diff options
author | fanquake <fanquake@gmail.com> | 2019-10-18 17:25:06 -0400 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2019-10-18 17:38:38 -0400 |
commit | b6e34afe9735faf97d6be7a90fafd33ec18c0cbb (patch) | |
tree | 5052d0e06625046632f1e2a46b7773c1d815f34b /src | |
parent | fd3b4e422d6826f53e0f283148a9ee0701ffe468 (diff) | |
parent | b5f0be38790ecc87a1e537edeca5923f608bc68c (diff) | |
download | bitcoin-b6e34afe9735faf97d6be7a90fafd33ec18c0cbb.tar.xz |
Merge #17184: util: Filter out macOS process serial number
b5f0be38790ecc87a1e537edeca5923f608bc68c util: Filter out macOS process serial number (Hennadii Stepanov)
Pull request description:
Fix #17179
ACKs for top commit:
laanwj:
ACK b5f0be38790ecc87a1e537edeca5923f608bc68c
MarcoFalke:
unsigned ACK b5f0be38790ecc87a1e537edeca5923f608bc68c
promag:
ACK b5f0be38790ecc87a1e537edeca5923f608bc68c.
fanquake:
ACK b5f0be38790ecc87a1e537edeca5923f608bc68c - Tested that this fixes #17179.
Tree-SHA512: 84ce859e53ebc7ad2d0a45e954243ef6efee640f1e0212322f68a317e4361a216ecb4b5a3a410ab31613adc285c8d3840fbf41fa9da9019be3d734db6b9427cd
Diffstat (limited to 'src')
-rw-r--r-- | src/util/system.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util/system.cpp b/src/util/system.cpp index 6199e5daad..526bf559c3 100644 --- a/src/util/system.cpp +++ b/src/util/system.cpp @@ -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('='); |