[Xquartz-dev] 2.3.2_rc4

Harald Hanche-Olsen hanche at math.ntnu.no
Sun Dec 21 04:54:30 PST 2008


+ Cameron Simpson <cs at zip.com.au>:

> [...] incorrect behaviour.

Executive summary: Shell scripting is hard and dangerous to boot. 
Don't try it at home.

Yes, that was a joke, but I'm serious too.

OBXQuartz: It could be argued that running a login shell for any 
other purposes than actually logging in on a terminal is incorrect 
behaviour, not least becaue many login scripts contain various 
terminal setup code (stty, tset) that really shouldn't be run when 
stdin is not a tty. Perhaps because of this, one should get in the 
habit of wrapping such code in a test like

if tty >/dev/null 2>&1; then
  ...
fi

- Harald


More information about the Xquartz-dev mailing list