flock before execve?

I’m seeing some funky “new” (to me) behavior that I’m having trouble tracking down. Maybe y’all have seen it before. Using kernel 2.6.18-6-686 (debian etch), I can have a shell script open in vi, and suspend vi to run it. But on 2.6.26-1-686 (debian lenny) I get this error:


host:~/dir# ./shellscript -foo
-bash: ./shellscript: /bin/bash: bad interpreter: Text file busy

If I exit out of vi I can run the script just fine. I can also run the script with “sh shellscript”. strace reveals that the failure is happening super early on:


host:~/dir# strace ./shellscript -foo
execve("./shellscript", ["./shellscript", "-foo"], [/* 19 vars */]) = -1 ETXTBSY (Text file busy)

It looks like the kernel must be checking for exclusive advisory locks before proceeding. I have checked around Google and I see others have had the same trouble, and they’re always told to make sure the file isn’t open by some other process. But I can’t find where new behavior was introduced. Best I can gather, it’s just accepted as the norm now. Seems awfully weird to me.

UPDATE: As noted in the comments, the kernel isn’t doing flock before execve. It’s just preventing you from running commands if the file is open for writing. It’s old behavior. I only saw it now because old nvi didn’t keep the write file handle open (or at least, not in the same way) and new nvi does.

Got married

It’s official. Esther and I are now married. We don’t have any photos from the wedding (on our cameras), but it’s assured that we will be receiving digital pictures of us in various staged and unstaged poses. When we do, we’ll post them somewhere.

seq? come on.

seq is a handy tool if you want a list of numbers:


$ seq 1 4
1
2
3
4

But then they had to go and try to be fancy:


$ seq 1000000 1000010
1e+06
1e+06
1e+06
1e+06
1e+06
1e+06
1.00001e+06
1.00001e+06
1.00001e+06
1.00001e+06
1.00001e+06

What the fuck. (The “fix” is to use seq -f %.f)

wtf

unintelligible

Complaining about captchas may be passé, but come on! This is fucking awful.

Fantastic Contraption

This game is damn neat. It’s fun to build up a giant tank, total overkill, and then watch it fail because you missed a strut or something. It’s equally fun to build something small and basic: I thought for sure that this contraption would fail. (It certainly didn’t work the way I had planned.)

Spore

I’ve been playing Spore most nights since it arrived. I’ve played from the Cellular stage all the way through the Space stage. I think it is fair to say that I’ve seen everything that the game offers, and I find it very limited. I’m in full agreement with Yahtzee’s review of Spore and I will try not to duplicate too much of what he’s said.

I think what I was hoping for was deeper gameplay. At the Space stage, I was imagining a near full implementation of SimCity wrapped in Civilization wrapped in Masters of Orion. I wanted to be able to “get lost” in building cities or waging war. Instead, the city building is incredibly simplified (make sure you don’t put factories next to entertainment buildings and you’ll do fine). Waging war is as simple as flying to the enemy planet and zapping each colony’s city hall — on a planet with 3 colonies, you could take the whole planet over in under a minute.

Somehow your race evolved to the point that one and only one creature (you, of course) is capable of flying a space ship and protecting the entire species. They’ve apparently developed incredible cloning technology that allows them to transfer all of your thoughts to a new body, meaning you can never truly die. When your ship is blasted out of the sky, they build you a brand new one. However, for some reason, only one of these ships can exist in the universe at a time. The only way to have a fleet of ships is to ally with other species. (They are, unfortunately, also limited by the one-ship-per-universe rule.)

Not only are you the only hope for interstellar defense, but you are the sole creature capable of trading “spice”, a commodity that is harvested on each planet. To make money, you have to fly to a star system, zoom in so you can make contact with the planet, pick up some spice automatically (if it is one of your planets), make contact, ask them to trade, buy whatever spice they have for sale, and then decide whether or not the prices they’re willing to pay are good enough. Exit out of the trade screen, zoom out to space, travel to the next system, and repeat the whole cycle. It’s tedious. You can’t simply set up a trade route that actually trades Spice and makes you money. You can set up trade routes, but they’re for entirely different purposes: Once the trade route has existed long enough, you’re able to purchase the foreign planet for an additional price.

You’re also the only one capable of dealing with eco-disasters. Occasionally, a virus will break out and infect 5 animals on a planet. You must travel to the planet and zap those 5 animals with a laser — there’s no way for the people in the cities to do this themselves, apparently.

Ultimately, the level of micromanagement required by the game is not nearly deep enough to be interesting. As your dominion grows you are asked to come to the defense of colonies more frequently, to the point that every couple of minutes there is some disaster you have to deal with. Even if there were more compelling micromanagement, you would only get a one or two minutes with it before you were pulled away to deal with some other nonsense.

There is a patch for the Windows version of Spore that claims to address some of the concerns. It reduces the frequency of attacks by enemy species, as well as the frequency of eco-disasters. Even though the Mac version is the Windows version under emulation, the patch is not yet available for the Mac, so I can’t say first hand if it makes the game any more or less fun. However, without more fundamental changes in gameplay, I don’t have high hopes.

In Front of our Office

There are 4 or 5 people in front of our office surrounding a plastic bag full of clothing, yelling about what specific items they need while they grab them and put them on, in addition to yelling about what items they already have. It’s entirely normal for there to be people yelling in front of our office (and I assume it’s normal for this to occur everywhere, right?), but what’s unusual is that they’re changing clothes while yelling.

Ron Sims and the Bus Wraps

In the Times today: Sims proposes bringing back bus-wrap ads.

Sims now proposes that the council allow partial-wrap ads that would leave a 15-inch band of glass unobstructed. “If that provision is repealed, Metro would like to sell a limited number of partial-wrap buses,” [Sharron] Shinbo said.
She said Metro estimates it would make $275,000 in 2009 and $408,000 in 2010 with 25 partial-wrap buses.

Metro’s problems are fueled by a spike in diesel prices and, most important, a sharp reduction in sales-tax revenue. Metro’s two-year, $1.1 billion operating budget is funded mainly by a sales tax of 0.9 percent, or 9 cents per $10 purchase.

Ron Sims, supposed champion of mass transit who is strangely opposed to light rail, is in favor of returning us to the days of the ugly ad-wrapped buses. The original wrapped buses were “full-wraps”, which meant that if you were a passenger, you could not easily see out of the windows. The new proposal is better, if you’re of a certain height, but (incredibly) they’re far uglier.

I agree with Councilman Bob Ferguson’s sentiment: “[Bob Ferguson] added he would support wrapping bus windows when county executives agreed to wrap their office windows.”

Now, let’s do the math real quick on this. According to this article, Metro’s biannual budget is $1.1 billion dollars. The partial-wrap ads being proposed are projected to pull in $275k in 2009. If my calculations are correct, 275,000/1,100,000,000 is 0.025%. Ron Sims’ solution to Metro’s funding woes (brought on by increased diesel prices and reduced sales tax receipts) is to whore off the buses for a measly 0.025%.

While wrapping buses would bring in just a fraction of the money needed to erase the deficit, Shinbo said, anything helps.

“Anything helps” might be true if this matter were not distracting the council from real solutions that have at least single-digit impacts on the budget. The time, energy, and money spent studying, debating, and voting on this matter is appalling. I am disappointed that Ron Sims continues to push this as a solution.