Profile

unixronin: Galen the technomage, from Babylon 5: Crusade (Default)
Unixronin

December 2012

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

Most Popular Tags

Expand Cut Tags

No cut tags
Tuesday, November 18th, 2003 12:42 pm

So, everyone's familiar with the shell ignoreeof setting, right?

You aren't....?  Philistines.  OK, for the non-geeks among us, the ignoreeof setting in a Unix shell tells the shell how many successive Ctrl-D (EOF, End Of File) characters it should ignore before exiting.

[Error: Irreparable invalid markup ('<p.anyway,>') in entry. Owner must fix manually. Raw contents below.]

<div align="justify"> <p>So, everyone's familiar with the shell ignoreeof setting, right?</p> <p>You aren't....?&nbsp; Philistines.&nbsp; OK, for the non-geeks among us, the ignoreeof setting in a Unix shell tells the shell how many successive Ctrl-D (EOF, End Of File) characters it should ignore before exiting.</p> <p.Anyway, a question on one of my mailing lists about how to set ignoreeof in bash led to a question, purely out of curiosity, from another poster about how high the value of ignoreeof can be set.&nbsp; "Inquiring minds want to know!"</p> <p>Well, in another priceless service to collectors and purveyors of useless information everywhere, the answer can now be told.&nbsp; I found out by experiment that ignoreeof in bash-2.05b on a Sun Ultra30 running Solaris 9 can be validly set as high as 2<small><sup>31</sup></small>-1, but a value of 2<small><sup>31</sup></small> overflows and is treated as 0 (immediate exit on the first EOF character).&nbsp; On the other hand, on a Linux system (bash-2.05b, kernel 2.4.22, glibc-2.3.2) I was able to apparently-successfully set ignoreeof to 2<small><sup>128</sup></small>, 2<small><sup>256</sup></small>, and even, in a moment of complete insanity, 2<small><sup>1024</sup></small>.</p> <p>(For those of you who aren't up on exponential notation, 2<small><sup>1024</sup></small> is a <i><b>Really Fucking Big Number</b></i> (that's an advanced technical term, y'know) which looks something like this, written out longhand:<br> <blockquote> 17976931348623159077293051907890247336179769789423065727343008115773 26758055009631327084773224075360211201138798713933576587897688144166 22492847430639474124377767893424865485276302219601246094119453082952 08500576883815068234246288147391311054082723716335051068458629823994 7245938479716304835356329624224137216<br> </blockquote> Of course, I'm sure that gets internally truncated to something relatively sane like the aforementioned 2<small><sup>31</sup></small>-1.&nbsp; (That's a little number -- it's only 2147483647.)</p> <p>So if you ever wanted a login session to resist up to 2<small><sup>31</sup></small>-1 successive Ctrl-Ds, now you know that it can be done.</p> <p>(No, I didn't actually sit here and type in 2<small><sup>1024</sup></small>, or even 2147483647, successive Ctrl-Ds.&nbsp; What kind of crazy loon do you think I am?)</p> <p><br><br><br><br>(...On second thoughts, don't answer that.)</p> </div>
Tuesday, November 18th, 2003 10:24 am (UTC)
What kind of crazy loon do you think I am?)

The kind that I married? Willingly? Joyfully? Wouldn't leave in a million years?

(So that's what you were doing when I was trying to ignore little girls and get a bit more rest to finish killing this cold which seems to have only lasted 5 days.)
Tuesday, November 18th, 2003 10:39 am (UTC)

That, and hocking up what feels like chunks of lung, and finding out that neither OpenOffice 1.1 nor XWP8 nor KWord can successfully open L-3's EEO form in RTF format ....



Tuesday, November 18th, 2003 10:49 am (UTC)
Ah. This is silliness again but if I open my mouth to talk Wen sticks her fingers in..

What is this crud anyhow? I'm already feeling better and you started feeling bad before I did.