bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash crashes when splitcurl script try download non existent file


From: Mikhail Gavrilov
Subject: Re: bash crashes when splitcurl script try download non existent file
Date: Fri, 21 Jun 2024 22:26:07 +0500

On Fri, Jun 21, 2024 at 10:06 PM Chet Ramey <chet.ramey@case.edu> wrote:
>
> 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.

Ok. But it's very suspicious for me because the script ended without
any issues on macOS.

mikhail@MBP-Mikhail ~> ./splitcurl.sh "ftp://test.rebex.net/no-file"; 10
Download failed!
mikhail@MBP-Mikhail ~>
mikhail@MBP-Mikhail ~> bash --version
GNU bash, version 3.2.57(1)-release (arm64-apple-darwin24)
Copyright (C) 2007 Free Software Foundation, Inc.
mikhail@MBP-Mikhail ~>

-- 
Best Regards,
Mike Gavrilov.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]