Hacker News new | ask | show | jobs
by minaguib 381 days ago
In _this_ particular case, you could just tell curl to internally timeout the request (via `-m`) instead of trying to manage the timeout on the process level
1 comments

Not really, since it's calling `curl` in a loop, and they want the loop to timeout. There's possibly a set of options to curl to make it retry for a certain amount of time but I don't know it off the top of my head.
i think curl already have extensive options to handle such cases.

there are multiple docs with nice explanations too, for example:

https://everything.curl.dev/usingcurl/downloads/retry.html

i guess the premise is applicable to other processes which do not implement timeouts (eg: find) themselves