Re: solaris practical for home users?

From: Dragan Cvetkovic (me_at_privacy.net)
Date: 09/19/03


Date: Fri, 19 Sep 2003 15:46:35 -0400

Paul Eggert <eggert@twinsun.com> writes:
> At Fri, 19 Sep 2003 06:41:55 GMT, phil+s3@bolthole.no-bots.com (Philip Brown) writes:
>
>> the trend for "open cross platform software" became subverted by
>> "stuff that works on my l1nux box"

[snip]
>
> Here's one example: I recently fixed a portability bug in a script
> that did something like this:
>
> if test -L foo
> then echo foo is a symbolic link
> fi
>
> This script works on GNU/Linux, OpenBSD, etc. It's portable POSIX
> code. It also works on Solaris 9. But it doesn't work on Solaris 8
> /bin/sh (which supports only "test -h", not "test -L"). The author of
> the script doesn't use Solaris, so he didn't know that particular
> porting quirk. But it would be entirely unfair to accuse him of
> writing just "stuff that works on my GNU/Linux box".
>

Paul, according to http://www.opengroup.org/, both '-h' and '-L' were added
to test in issue 6. The fact that it works on Linux, OpenBSD etc is
probably because bash supports it (I think so ...).

I think that what Phil was complaning about is the use of non-standard,
Linux specific intefaces (like /proc).

After all, if you develop a program in and on Solaris and you want it to be
multi-platform, you will avoid Solaris specific stuff like /proc or
doors or remote shared memory or ...

The same principle should apply for Linux developers.

Stick to POSIX (OK, above example with 'test' is more exception to the
rule). Be conservative. Read (I know you know all that, this was more of a
general remark).

Bye, Dragan

-- 
Dragan Cvetkovic, 
To be or not to be is true. G. Boole      No it isn't.  L. E. J. Brouwer
!!! Sender/From address is bogus. Use reply-to one !!!


Relevant Pages

  • Re: anyone have something like find
    ... solaris and linux find don't ignore files randomly. ... Eventually your script might get confused by symlinks pointing to ... folders, which may lead to multi-traversal of some subdirs at least, ...
    (comp.lang.tcl)
  • what is the best way to determine system OS?
    ... (debian, RH, Fedora, Solaris, AIX, etc) ... mattered beyond the detail of Linux or SunOS etc. ... Recently I have learned that FC3 breaks my script, ...
    (comp.lang.python)
  • Re: Linux is Driving me $#@!!!! nutz!!!
    ... Syntax of the route command varies between Linux and Solaris quite regularly, ... It seems like they all simply launch a shell script for ...
    (rec.crafts.metalworking)
  • Re: where I can set Library PATH?
    ... > crontab i must declare that variable in every script. ... > Is there another way in Solaris similar to Linux? ... crleallows configuration of library paths. ...
    (comp.unix.solaris)
  • Re: Will Linux become as vulnerable as MS ??
    ... > beeing vulnerable to viruses. ... > that they know are executable, and execute intentionally. ... >> Linux, each distro is a little different, and even within the distro, ... > Since clicking on a script is easier than typing it's name, ...
    (comp.os.linux.security)