Implementing the options --pid and --daemon