title: lockfile-create does not work in bash script
body: <p>This can be a very simple question but I don't understand why it behaves that way. When I invoke</p>
  
  <pre><code>lockfile-create --use-pid --retry 0 /tmp/my_lock_file
  </code></pre>
  
  <p>it returns 0, and next time it runs it returns some other code(4) as expected since it has already created the lock file. But when I wrap that same code in a bash script file, it always returns 0 as the exit code. Does someone know why it does not work?</p>
  
  <p>Update: Complete bash file content</p>
  
  <pre><code>#! /bin/bash
  
  LOCK=alert
  
  lockfile-create --use-pid --retry 0 $LOCK
  LOCK_CREATED=$?
  echo "Lock file creation status $LOCK_CREATED"
  </code></pre>
  
  <p>and this is how I run it ./alert.sh. </p>