I'm currently on a Debian 10 machine working as a small server. I installed aria2c and use it as a download service. Everything is working probably so far. My question is:
- I started the aria2c as a daemon with an init.d script.
- There will be written a pid file.
- If I check the processes, the PID of aria2c is different than the PID in the file.
Can someone explain me why? (Please note - this is not a functional problem for me, I like to understand why. Or maybe I'm doing something wrong...)
$ cat /var/run/aria2c.pid
561
$ sudo /etc/init.d/aria2 status
...
CGroup: /system.slice/aria2.service
└─565 /usr/bin/aria2c --daemon=true --enable-rpc --conf-path=/etc/aria2.conf
$ pgrep aria2
565
$ ps ax | grep aria*
565 ? Ss 0:36 /usr/bin/aria2c --daemon=true --enable-rpc --conf-path=/etc/aria2.conf
$ cat /proc/56
56/ 565/
So this means for me that the process 561 is not existing any more. But why do I have this PID in my pid file?