I like the chdir, myself, and think it will look neater than ‘cd / && bitcoind’ so may I propose two new command-line switches:
- -chdir; CHange DIRectory to / (or C:) prior to daemonising, can perhaps later be changed into a noop.
- -pwdir; Preserve Working DIRectory*, currently a noop, can perhaps later be changed into preserving current functionality.
I considered giving -chdir an optional option to specify which directory, with / or C:\ as the default, but that seems like overkill and makes option parsing Magic; a dirty word.
I think this fits well with bitcoind’s triple life as a system daemon, user daemon or user interface.
Edit: One more thing, I’m aware that in the grand scheme of things this addition is largely unimportant and have no intention of starting a bike-shedding.
[*] Not what it really stands for.