From b0e9190cda2d95ac57f05edd53bbfce8342cb7e1 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Sun, 20 Sep 2015 18:45:16 +0200 Subject: README.md: explain why flock is used --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 79efb08..1c6f2b1 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,9 @@ strictly. Enforcing job order works like this: - every job has a flock(2)ed output file ala `,TIMESTAMP.PID` - every job starts only after all earlier flock(2)ed files are unlocked -- the lock is released by the kernel after the job terminates +- Why flock(2)? Because it locks the file handle, which is shared + across exec(2) with the child process (the actual job), and it will + unlock when the file is closed (usually when the job terminates). You enqueue (get it?) new jobs using `nq CMDLINE...`. The job id is output (unless suppressed using `-q`) and `nq` detaches immediately, -- cgit 1.4.1