The error in both cases is "unable to lock: A file descriptor does not refer to an open file."
Considering your code does a plain exit if the flock fails, I quite surprised you get any error message at all.
Perhaps the code you are showing isn't the code you are running?
In reply to Re: Lightweight Solution To "Only 1 Process Running" On AIX
by JavaFan
in thread Lightweight Solution To "Only 1 Process Running" On AIX
by Limbic~Region
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |