1
0
Fork 0
mirror of synced 2026-12-06 18:22:25 +00:00
No description
  • C 96.3%
  • M4 2.6%
  • Makefile 1.1%
Find a file
Parker Wahle e99edf6c2e
windows: end the smoke test with exit 0
The runner appends `exit $LASTEXITCODE` to a pwsh step, and the last assertion leaves it at 3 on purpose, so a passing smoke test failed the step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 12:30:45 -04:00
.github windows: end the smoke test with exit 0 2026-10-12 12:30:45 -04:00
windows Add a Windows build against the MSYS2 runtime 2026-10-12 12:28:26 -04:00
.gitignore Add help2man to debian packaging build dependencies. 2020-01-15 21:38:53 +02:00
AUTHORS Initial creation of the autotools. 2020-01-05 18:19:37 +00:00
ChangeLog Bump version after tag. 2025-06-15 12:55:08 +01:00
config.h.in Update autoheader file. 2025-06-07 17:50:24 +01:00
configure.ac Bump version after tag. 2025-06-15 12:55:08 +01:00
COPYING Place the correct license text in the COPYING file. 2020-01-27 16:57:31 +02:00
INSTALL Update README and man pages. 2023-01-04 14:45:32 +00:00
LICENSE Initial creation of the autotools. 2020-01-05 18:19:37 +00:00
Makefile.am Reinstate the dist-hook to Makefile.am. 2025-06-07 17:48:41 +01:00
NEWS Initial creation of the autotools. 2020-01-05 18:19:37 +00:00
README Initial creation of the autotools. 2020-01-05 18:19:37 +00:00
README.md Update README to include Fedora and EPEL for retry tool 2025-12-08 13:56:08 +00:00
retry.c Fix detection of a delay. 2025-06-07 22:35:13 +01:00
retry.spec.in Add changelog to the spec file, correct license string. 2025-06-15 12:52:45 +01:00

retry

Retry a command until the command succeeds.

Retry captures stdin into memory as the data is passed to the repeated command, and this captured stdin is then replayed should the command be repeated. This makes it possible to embed the retry tool into shell pipelines.

Retry captures stdout into memory, and if the command was successful stdout is passed on to stdout as normal, while if the command was repeated stdout is passed to stderr instead. This ensures that output is passed to stdout once and once only.

downloads

The retry tool is available as RPMs through COPR as follows:

dnf copr enable minfrin/retry
dnf install retry

The retry tool is available by default on Debian derived systems, Fedora systems, and EPEL.

example

~$ retry --until=success -- false
retry: 'false' returned 1, backing off for 10 seconds and trying again...
retry: 'false' returned 1, backing off for 10 seconds and trying again...
retry: 'false' returned 1, backing off for 10 seconds and trying again...
^C

more complex example

~$ retry -- curl --fail http://localhost/entities | \
  jq ... | \
  retry -- curl --fail -X POST http://localhost/resource | \
  logger -t resource-init

staggered delays

~$ retry --until=success --delay "1,2,4,8,16,32,64" -- false
retry: false returned 1, backing off for 1 second and trying again...
retry: false returned 1, backing off for 2 seconds and trying again...
retry: false returned 1, backing off for 4 seconds and trying again...
retry: false returned 1, backing off for 8 seconds and trying again...
retry: false returned 1, backing off for 16 seconds and trying again...
retry: false returned 1, backing off for 32 seconds and trying again...
retry: false returned 1, backing off for 64 seconds and trying again...
retry: false returned 1, backing off for 64 seconds and trying again...
retry: false returned 1, backing off for 64 seconds and trying again...
^C

fixed number of times

~$ retry --times=3 -- false
retry: false returned 1, backing off for 10 seconds and trying again...
retry: false returned 1, backing off for 10 seconds and trying again...
retry: false returned 1, giving up.