On 6/18/24 6:49 PM, Mikhail Gavrilov wrote:
Hi, bash crashes when splitcurl script try download non existent fileHere is script: https://github.com/axelabs/splitcurl/blob/master/splitcurl Example which is triggers crash:./splitcurl "ftp://test.rebex.net/no-file" 10fish: Job 1, './splitcurl "ftp://test.rebex.n…' terminated by signal SIGSEGV (Address boundary error)
It's a bug in the script. If you want to run `kill 0', which sends SIGTERM, from a SIGTERM trap handler, you need to reset the SIGTERM trap to the default before doing so. Bash allows recursive trap handlers. What's happening is you're recursively invoking the trap handler until you exceed the stack space resource limit. Bash has an internal limit on how many times you can recursively eval a trap handler, but you run out of stack space before exceeding it. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature