Skip to content

Conversation

patrickludwig
Copy link

@patrickludwig patrickludwig commented Mar 7, 2018

The command 'pgrep -o -f "$APPNAME"' is not safe, as it might return,
e.g. a running editor session where something with $APPNAME is edited!

Also, some users might want to run two backups simultaneously:

rsync-time-backup => DEST1 (oldest PID)
rsync-time-backup => DEST2 (2nd oldest PID)

In that case, simply comparing the oldest PID of APPNAME with RUNNINGPID
will not prevent starting of several instances of the backup to DEST2.

Instead one should check, as done for cygwin (some lines above), whether
the process currently running under RUNNINGPID is identical with $APPNAME.

The command 'pgrep -o -f "$APPNAME"' is not safe, as it might return,
e.g. a running editor session were something with $APPNAME is edited!

Also, some users might want to run two backups simultaneously:

   rsync-time-backup => DEST1 (oldest PID)
   rsync-time-backup => DEST2 (2nd oldest PID)

In that case, simply comparing the oldest PID of APPNAME with RUNNINGPID
will not prevent starting of several instances of the backup to DEST2.

Instead one should check, as done for cygwin (some lines above), whether
the process currently running under RUNNINGPID is identical with $APPNAME.
@SimonHeimberg
Copy link
Contributor

Pr #129 fixes the same (did not see before, sorry), with less tools and the same way as netbsd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants