wallet_child: spawn errors must name argv[0] and refuse a bin that is not an executable file #203
Loading…
Reference in a new issue
No description provided.
Delete branch "wt/t_af5bbc1a"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
The Android wallet screen showed
Wallet error→spawn monero-wallet-rpc: No such file or directory (os error 2).That names the label, not the
argv[0]that failed, so a baremonero-wallet-rpc(never resolvable in an APK sandbox) and an absolute/data/app/.../libmonerowalletrpc.so(present in the v0.7.0 APK) produced the same undiagnosable message.What changed
spawn(argv, what)now carries both halves:spawn monero-wallet-rpc (<argv[0]>): <errno verbatim>. The existing human label stays; no cause is invented for indistinguishableErrorKinds.check_wallet_rpc_bin(configured, resolved, bare_resolvable)pre-flights the resolved wallet RPC bin before anything is spawned (beforemonerod/Cuprate, before the SOCKS child, before creds):... not found (<errno>)... is not a file... is not executablePATHsearch and no fallback location: a bare name is left toexecwhere aPATHexists.ChildConfig::validate()now refuses a barewallet_rpc_binwhere a child has noPATHto resolve it (cfg!(target_os = "android")), instead of persisting a setting that could only fail atexec. Desktop behaviour is unchanged (the bare-name default still passes there and resolves viaPATH).ChainSource::Noneis untouched:startreturns beforestart_children, so receive-only still spawns nothing and validates nothing.Verification (this host, branch
wt/t_af5bbc1a@a375ef9)Existing
node::tests::a_missing_binary_fails_the_start_and_leaves_no_childasserted onlyerr.contains("spawn"); it now asserts the configured path andnot found.Notes
cfg!(target_os = "android")) inside the core; the Android branch ofcheck_wallet_rpc_binis unit-tested by passingbare_resolvable = falseexplicitly on this host, so the rule has a test that runs here.--rpc-login,--trusted-daemon, arti/SOCKS, Kotlin or docs changes.