Tor exits when configuring a PidFile containing ~
The patch in legacy/trac#28298 (moved) may avoids the "~" bug in DataDirectory, but adding ~ to many other configured path makes tor exit:
tor DisableNetwork 1 PidFile "~/.torpid"
with this error:
Nov 05 00:07:29.465 [notice] Tor 0.3.4.9 (git-4ac3ccf2863b86e7) running on Darwin with Libevent 2.1.8-stable, OpenSSL 1.0.2p, Zlib 1.2.11, Liblzma 5.2.4, and Libzstd 1.3.7.
Nov 05 00:07:29.466 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Nov 05 00:07:29.467 [notice] Configuration file "/usr/local/etc/tor/torrc" not present, using reasonable defaults.
Nov 05 00:07:29.473 [warn] Path for PidFile (~/.torpid) is relative and will resolve to /Users/base/tor-034/build-c/~/.torpid. Is this what you wanted?
Nov 05 00:07:29.475 [notice] Scheduler type KISTLite has been enabled.
Nov 05 00:07:29.475 [notice] Opening Socks listener on 127.0.0.1:9050
Nov 05 00:07:29.000 [warn] Unable to open "~/.torpid" for writing: No such file or directory
Nov 05 00:07:29.000 [err] Unable to write PIDFile "~/.torpid"
Nov 05 00:07:29.000 [err] set_options: Bug: Acting on config options left us in a broken state. Dying. (on Tor 0.3.4.9 4ac3ccf2863b86e7)
Nov 05 00:07:29.000 [err] Reading config failed--see warnings above.