I know parity can run as a daemon because the –help has a usage parity daemon <pid-file> [options]
but no further help/clues/documentation is provided. What is <pid-file>
? A process ID file, and what is that? If it is supposed to be a systemd unit file why doesn't it say so.
The only other clue I can find after searching and searching is this:
https://daowiki.atlassian.net/wiki/display/DAO/Ethereum+network
It says to edit the parity.service and parity.conf file, however both of those do not exist. I can try creating them but then why is there NOTHING when googling on this. I can't be the first and only person on this planet to want to run parity as a daemon. (I don't want this question to sound negative. I really appreciate the great contribution the ethcore team and their parity project has given to the Ethereum community!)
Ubuntu 16.04
parity v1.2.2
Best Answer
TL;DR - it's just a path to an empty file of your choice, and prevents multiple instances of the daemon from running. (I don't think the file even needs to exist - it will be created for you.)
Parity uses the general Rust implementation of
daemonize()
, which itself takes apid_file
argument.Taking things one step further, the Rust implementation is based on Python's daemonize library, which again uses the same idea.
The basic idea is to prevent multiple versions of your script/program running at the same time. Your
pid_file
argument is just a path to a file where the pid will be stored, which at first will be empty, but which will be written to by the running program./tmp/parity_daemon.pid
);