Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | nq: add support for a $NQFAILDIR | Pulux | 2022-09-25 | 1 | -1/+21 |
| | |||||
* | nq: change default permissions to 0666 (subject to umask) | Leah Neukirchen | 2021-12-15 | 1 | -1/+1 |
| | | | | This should be the default behavior for programs creating new files. | ||||
* | nq: open lock files read-only when we don't write into them | Leah Neukirchen | 2021-12-15 | 1 | -4/+4 |
| | | | | flock(fd, LOCK_EX) should still work. | ||||
* | nq: only change u+x bit to mark running job | Leah Neukirchen | 2021-12-15 | 1 | -4/+16 |
| | |||||
* | donepath | jonsykkel | 2021-05-01 | 1 | -1/+1 |
| | | | | Closes: #38 [via git-merge-pr] | ||||
* | nq: simplify O_DIRECTORY usage | Leah Neukirchen | 2021-03-13 | 1 | -8/+4 |
| | |||||
* | nq: initialize fd with -1 instead of a possible valid value | Leah Neukirchen | 2021-03-13 | 1 | -1/+1 |
| | |||||
* | nq: add support for a $NQDONEDIR | Leah Neukirchen | 2021-03-13 | 1 | -4/+30 |
| | |||||
* | nq: use shared locks when waiting for other lockfiles | Duncan Overbruck | 2021-03-13 | 1 | -4/+4 |
| | | | | | | | | The nq process itself will hold an exclusive lock on its lock file, the other nq processes will now use a shared lock to test if the previous queue item is still locked. By using shared locks, multiple nq processes testing the same shared lock don't interfere with other nq processes checking for locks. | ||||
* | nq: check d_name fits into newestlocked (our filenames always will) | Leah Neukirchen | 2021-03-13 | 1 | -1/+2 |
| | |||||
* | nq: revamp waiting loop to avoid busy loops in contested cases | Leah Neukirchen | 2021-03-13 | 1 | -18/+27 |
| | | | | | | | | | | | | | | | | | As reported in #37, the current rewind-loop has the issue of waiting for a lock on the first file that is locked, but it could be detected as being locked by another process that also just wants to check this file. As both processes rewind the dir and retry in this case, this can yield a busy loop. Instead, find the newest locked file and wait for that. This should result in most nq processes waiting for different locks, so this kind of synchonization cannot appear. In theory, removing the rewinddir would be enough, as later nq runs should not result in enqueuing earlier jobs, but it's better to be safe and check there are no more locked files before we launch our job. | ||||
* | nq: don't define _XOPEN_SOURCE | Leah Neukirchen | 2018-03-07 | 1 | -2/+0 |
| | | | | | This hides LOCK_* on FreeBSD and OpenBSD, and is not needed anyway. Closes #26. | ||||
* | nq: write_execline: avoid unnecessary quoting | Leah Neukirchen | 2018-03-02 | 1 | -7/+17 |
| | |||||
* | nq: fix -w and -t without arguments | Leah Neukirchen | 2018-01-31 | 1 | -1/+1 |
| | |||||
* | nq: properly check for empty command lines | Leah Neukirchen | 2018-01-31 | 1 | -1/+1 |
| | | | | | | | `nq -q` could trigger a segfault before. Found by Leonardo Taccari. Fixes #25. | ||||
* | nq: add -c to clean job file when process succeeded | Leah Neukirchen | 2018-01-18 | 1 | -5/+15 |
| | |||||
* | style | Leah Neukirchen | 2017-08-31 | 1 | -2/+2 |
| | |||||
* | Leahize v0.2 | Leah Neukirchen | 2017-04-26 | 1 | -2/+1 |
| | |||||
* | nq: add dprintf stub for Solaris | Christian Neukirchen | 2016-03-21 | 1 | -0/+22 |
| | |||||
* | nq, fq: fall back on when O_DIRECTORY is not defined | Christian Neukirchen | 2016-03-21 | 1 | -0/+4 |
| | |||||
* | nq: open dirfd with O_DIRECTORY to fail early | Christian Neukirchen | 2015-08-28 | 1 | -1/+1 |
| | |||||
* | nq: mkdir $NQDIR | Christian Neukirchen | 2015-08-28 | 1 | -0/+7 |
| | |||||
* | nq: error handling for dup2 | Christian Neukirchen | 2015-08-27 | 1 | -2/+5 |
| | |||||
* | nq: fsync after rename | Christian Neukirchen | 2015-08-27 | 1 | -0/+3 |
| | | | | | For details, see https://groups.google.com/forum/#!topic/comp.unix.programmer/AM2V83RCOVE | ||||
* | nq: add quiet flag -q. | Christian Neukirchen | 2015-08-25 | 1 | -5/+10 |
| | |||||
* | nq.c: fix time_t overflow on 32-bit machines | Lv Zheng | 2015-08-11 | 1 | -1/+1 |
| | | | | | | | In systems where time_t is defined as 32-bit integer, the multiplication by 1000 to get millisecond will cause an integer overflow. Fix this problem by explicit integer conversion. | ||||
* | nq: check pipe(2) for errors. | Christian Neukirchen | 2015-08-07 | 1 | -1/+4 |
| | |||||
* | nq.c: add `static' qualifier to global functions. | Lv Zheng | 2015-08-07 | 1 | -2/+2 |
| | |||||
* | nq: launch job in own process group to simplify killing it all. | Christian Neukirchen | 2015-08-07 | 1 | -0/+1 |
| | |||||
* | nq: use snprintf | Christian Neukirchen | 2015-08-06 | 1 | -3/+6 |
| | |||||
* | fix missed sprintf of int64_t | Christian Neukirchen | 2015-08-03 | 1 | -1/+1 |
| | |||||
* | redirect stdout/stderr before waiting, else nq sleep 100; b=$(nq sleep 100) ↵ | Christian Neukirchen | 2015-08-03 | 1 | -2/+4 |
| | | | | stalls | ||||
* | flock(2) is not actually POSIX... | Christian Neukirchen | 2015-08-03 | 1 | -2/+3 |
| | |||||
* | deal properly with int64_t values | Christian Neukirchen | 2015-08-03 | 1 | -5/+7 |
| | |||||
* | export NQJOBID to running jobs | Christian Neukirchen | 2015-08-02 | 1 | -0/+1 |
| | |||||
* | add -t to test if queue needs waiting | Christian Neukirchen | 2015-08-02 | 1 | -10/+18 |
| | |||||
* | wait for arguments of -w | Christian Neukirchen | 2015-08-02 | 1 | -23/+49 |
| | |||||
* | -w doesn't take any arguments | Christian Neukirchen | 2015-08-02 | 1 | -3/+3 |
| | |||||
* | add -w | Christian Neukirchen | 2015-07-31 | 1 | -5/+28 |
| | |||||
* | tweaks | Christian Neukirchen | 2015-07-31 | 1 | -6/+10 |
| | |||||
* | formatting | Christian Neukirchen | 2015-07-31 | 1 | -3/+4 |
| | |||||
* | introductory comment | Christian Neukirchen | 2015-07-31 | 1 | -1/+15 |
| | |||||
* | cleanups, usage | Christian Neukirchen | 2015-07-31 | 1 | -5/+10 |
| | |||||
* | close stdin/stdout, else it locks e.g. for "nq ... | cat" | Christian Neukirchen | 2015-07-31 | 1 | -0/+2 |
| | |||||
* | more cleanup | Christian Neukirchen | 2015-07-31 | 1 | -37/+59 |
| | |||||
* | clean up, use a pipe instead of signals | Christian Neukirchen | 2015-07-31 | 1 | -46/+44 |
| | |||||
* | reformat | Christian Neukirchen | 2015-07-31 | 1 | -119/+119 |
| | |||||
* | Initial import of nq | Christian Neukirchen | 2015-07-31 | 1 | -0/+175 |