- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Admin
This sort of epitomises your comment, but WTF, here I go...
"Actually, it's 2^-(1.02*10^8) percent. (-1.02*10^8 ends up being positive)"
This isn't pointing out minutae, this is making a WTF of operator precedence (with the added bonus of doing it in an attempt to show someone up)
Jesus wept. Of course, I saw the point of your comment (the way people point out minuate for absolutely no reason, other than they're nerds), but what's the point o^C ERROR - STACK OVERFLOW
Admin
The best WTF in a long time!
AWESOME! :D
(knowhutimean?)
Admin
"On the other hand, the epoch stuff will be much easier to correct than the stupid y2k error, because the next common datasize up from 32 is 64, and 64 will last 584,942,417,355 years, which should be enough for anyone."
That's exactly the kind of thinking that got us into trouble in the first place.
Admin
Well, its only a problem for half of them...
Admin
I look at this and think, well, it could be fixed (-ish) by using:
sleep $(( 2147483647 -
date +%s
))but I'm not sure if that's a happy fix. It means that after the infocalypse on Jan. 19, the script will start saying "sleep: invalid option" when it dies. Hopefully sleep would be fixed by then.
So the real fix would be:
sleep 1000000000 || sleep $(( 2147483647 -
date +%s
))Now that is a piece of code that should be very clearly commented. And I still think it sucks.
Admin
Now, if they used VMS, there wouldn't be a problem until the year 31,000 or so.
Except, of course, the problem of using VMS for the next 29,000 years.
Admin
Last time I opened a mail with that title I got a lot of angry comments from my friends.
Does that mean I'm popular?
Admin
/me wonders how many bits would be needed to cover the entire lifetime of the universe - in units of Planck time...
Admin
That's one poor implementation of sleep. The linux coreutils-5.94 doesn't have that problem. In fact of all the platforms that the SourceForge.net compile farm support, only OpenBSD and Solaris 9 (for x86) get it wrong.
Admin
You are wise.
In addition, if the startup script is sleeping, you can cause a graceful shutdown with a SIGTERM. (Sleep will exit immediately, and "stop oracle" will execute.)
Also may be useful if it has been started by a process which expects to be able to send a SIGTERM to shut it down again.
Verdict: Not stupid.
Admin
lulz... In 584 trillion years the universe itself will have ended and restarted about 6000 times.
Admin
"Who is more foolish the fool or the fool who follows him?"
Admin
The number of seconds since 1/1/70 right now was 61,109,675,529 by the way. This takes the 11-day Julian to Gregorian leap into account, but not leap seconds.
Admin
I've been using a real 64-bit OS since the mid '90s. On hardware that's relentlessly 64-bit, the late lamented Alpha.
Or so I thought until I dug around in /usr/include and noticed that time_t on tru64 was still 32 bits long.
Because, of course, there's all kinds of external on-disk and on-wire formats that expect 32-bit time.
Whereupon I had a flashback to 1980, when I was porting my programs from V7 on the PDP-11 to 4.1 BSD on the VAX, and found that sizeof (int) == sizeof (long). That was a real WTF moment. And I never got a good explanation from anyone why they didn't make long 64 bits on 32-bit machines back then.
After all, almost all the C code in the world at the time was written on 16-bit machines where sizeof (long) == 2 * sizeof (int), and an awful lot of it broke and had to be fixed when that wasn't true any more. If they'd done that, Bereley UNIX, the Berkeley TCP/IP stack and the standard TCP applications ... the ones used on virtually every commercial OS including Windows NT and VMS, would have been developed in an environment where 64-bit arithmetic was as easy and obvious as 32-bit had been on the PDP-11... and a few unfortunate 32-bit values like time_t might not be 32-bits.
Something to consider next time I've got a time machine and a spare afternoon.
Admin
Probably a hack so they can hit ctrl+c to stop the sleep process and have oracle shut down. Always better if you can use pause(2)...
Admin
The reason it's done that way is so that you can bring the database down in an orderly fashion just by killing (as in with a signal) the sleep process.
Admin
Assuming your default runlevel is 5, yes. On the other hand, defaulting to runlevel 5 might not be the brightest of ideas on a typical Solaris box.
Admin
Of course he was serious about Klingons. There have been about a million copies of the English-Klingon dictionary sold in this country. You're one of those religious nuts that don't believe in Klingons, aren't you???
Admin
My name is Inigo Montoya! You kill my father! Prepare to die!
Admin
I was thinkin', I'd give it an extra day's warning, don't wanna cut it too short findin' a solution. Heck, an extra 3 days, in case that day is a weekend. Heck, an extra week, in case whoever was on vacation. Heck, let's make it an extra month to account for plenty of time for a permanent solution, and any extra vacation days one might be taking due to changes in cultural norms.
Admin
You're joking, right?
Leaving aside all of the broken code out there, what are you going to do with billions of data files where the time was written as a 32-bit signed number? Esp. in those apps where somebody was hurried (or just lazy) and used
write(fd, s, sizeof(*s));
to write the 's' data structure.
The only bright side is that the disks themselves should be easy to handle, at least as long as there's a version field in the filesystem's volume header that indicates whether the file's timestamps are 32- or 64-bits.
Admin
Admin
Well duh.. if you just took the sleep out the script would stop the server right away ;-)