[SunHELP] RE: Disable Ctrl-D

Phil Stracchino alaric at caerllewys.net
Sat Dec 20 01:22:02 CST 2003


On Tue, Nov 18, 2003 at 08:35:27AM -0500, Sandwich Maker wrote:
> "From: Phil Stracchino <alaric at caerllewys.net>
> "
> "On Mon, Nov 17, 2003 at 11:28:45PM -0500, Asif Iqbal wrote:
> "> How do we do it in bash shell ?
> "
> "export ignoreeof=10
> "
> "You can set the value as high as you like, and the first n EOFs will be
> "ignored.  (Well, OK, they'll generate a message saying "Use logout to
> "exit the shell.")  There is no value to disable it altogether, though.
> 
> can you set it to -1?  2147483648?  4294967296?  higher?  curious
> minds want to know...

-1 (or -4, or ....  well, you get the idea) is considered "not a
number", and is therefore considered to have the value 10.  (Any
non-numeric value is considered to be 10.)  If no value is present, it's
treated as 0 (immediate exit).

As for absurdly high values, I successfully set ignoreeof to 2^128,
2^256, and even, in a moment of madness, 2^1024 on a Linux/Athlon system
running bash-2.05b with what appeared to be normal operation.  (I have
no idea whether the value was internally truncated, but I assume so.)

Meanwhile, bash-2.05b on a U30 running Solaris 9 would permit me to go
only as high as 2^31-1.  2^31 on the U30 resulted in an immediate exit,
but 2^31-1 ^Ds should be enough for anyone.

(Obviously, I didn't actually try *entering* 2^128 or even 2^31 ^Ds.)
 

-- 
 .*********  Fight Back!  It may not be just YOUR life at risk.  *********.
 : phil stracchino : unix ronin : renaissance man : mystic zen biker geek :
 :  alaric at caerllewys.net : alaric-ruthven at earthlink.net : phil at latt.net  :
 :   2000 CBR929RR, 1991 VFR750F3 (foully murdered), 1986 VF500F (sold)   :
 :    Linux Now!   ...Because friends don't let friends use Microsoft.    :



More information about the SunHELP mailing list