I've never used BSD. After reading the link provided by you, I think my program becomes no value, if there is a Linux version of lockf(1). Sad.
The scene for this program is that I don't know all the tasks.
Namely, tasks are generated in real time.
1. I posted some task to the queue and continue my work, then the work make me post another work. e. g. in a shell script
2. For server application to queue tasks
I've never used BSD. After reading the link provided by you, I think my program becomes no value, if there is a Linux version of lockf(1). Sad.