Wandering Thoughts archives

2010-08-23

Why I hate the Solaris 10 version of /bin/sh

Every so often I discover some exceptional piece of braindamage in Solaris. Here is one of them, presented in handy illustrated form:

$ cat cdtest
#!/bin/sh
cd /not/there || echo failed
echo got here

$ sh cdtest
./cdtest: /not/there: does not exist

(No other output is produced.)

Oh yes, Solaris. Killing my script when a cd fails is just what I want you to do, especially when this behavior is undocumented and cannot be turned off. I especially like it when you do this despite me making every attempt to handle the error.

It goes without saying that this behavior is in no way POSIX standard and in no way matches either the historical behavior of the Bourne shell or how the Bourne shell behaves on other systems.

I think that all of our Solaris shell scripts are about to change from '#!/bin/sh' to '#!/usr/bin/bash'. I'm not a huge fan of Bash, but at least it doesn't contain helpful landmines that blow up production scripts.

solaris/SolarisShBraindamage written at 11:56:39; Add Comment

My (probably wrong) assumption about Flash on Fedora

In hindsight, it is somewhat peculiar that I spent a considerable time using Fedora 11 with a broken Flash setup instead of seriously looking into the situation. What happened is that I made a simple assumption: I assumed that Flash and the associated infrastructure needed to run it on a 64-bit machine were second class citizens, looked down on and basically unsupported.

If I'd assumed that Fedora wouldn't leave Flash broken on 64-bit machines, then it being broken on my machine was clearly either something wrong with my machine that I could fix (which is what it turned out to be) or something worth a bug report. In either case I would have dug into it and probably solved the problem much earlier than I did. Instead I assumed otherwise, and also that any bug report involving Flash would would be promptly closed as either 'not our problem' or 'nothing we can do since Adobe Flash is a black box' (or both).

Although it sounds crazy, I don't think that this was an irrational assumption to make. I've at least perceived that the 'free software' view of Flash has generally been that it was an annoying and alarming proprietary technology that should be avoided, and certainly free software people weren't necessarily going to go out of their way to make it work. In this view, the odd thing wasn't that Flash wasn't working on my 64-bit machine; the odd thing was that it had ever worked.

(In fact at one point it didn't work by default; back in the time of Fedora Core 5 and 6, I had to compile my own versions of nspluginwrapper.)

One of the lessons I draw from both this incident and my earlier experiences of things starting to work on 64-bit Linux is that I need to periodically re-check my assumptions about what is and isn't supported on Linux. I may well be pleasantly surprised, as I have been in the past.

linux/FedoraFlashAssumption written at 01:07:08; Add Comment


Page tools: See As Normal.
Search:
Login: Password:
Atom Syndication: Recent Pages, Recent Comments.

This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.