Sorry, my earlier description was a bit unclear—my apologies.
I accidentally left out the ‘$’ before INT_MAX when copying it over, but I did 
include the ‘$’ in my actual testing.

As for `IGNOREEOF=127`, I expected it to let me press C-d over a hundred times 
without exiting bash, and in my testing, this actually worked. 
With `IGNOREEOF=$INT_MAX`, I expected it would let me press (INT_MAX-1) times, 
but when I tested it, pressing C-d just once caused bash to exit immediately.

It’s clear that INT_MAX really is the largest value bash allows for arithmetic 
operations (you can check how it’s calculated, or verify if it overflows by 
running `echo $[INT_MAX+1] $[INT_MAX] $[INT_MAX-1]`), but IGNOREEOF doesn’t 
seem to follow this limit. 

I think this might be a bug. 

If it’s not a bug, then IGNOREEOF must have its own maximum value.
I’m curious: what’s the largest integer value that’s safe, valid, and effective 
to use in various places in bash?

Reply via email to