xeyownt / borgcronic

A cron script to run Borg Backup
GNU General Public License v3.0
0 stars 0 forks source link

PID in lockdir and syslog are not correct #8

Closed xeyownt closed 7 years ago

xeyownt commented 7 years ago

borgcronic uses $$ to store the PID of the process owning the lock and as ID in syslog. This PID is not correct when the daemon forks itself to start the main backup process. In that case, $$ is the PID of the parent process, not of the child.

The fix is to always use $BASHPID.