*BSD News Article 33312


Return to BSD News archive

Xref: sserve comp.os.386bsd.misc:2839 comp.os.linux.misc:20336
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!swrinde!news.uh.edu!uuneo.neosoft.com!Starbase.NeoSoft.COM!nobody
From: peter@Starbase.NeoSoft.COM (Peter da Silva)
Newsgroups: comp.os.386bsd.misc,comp.os.linux.misc
Subject: Re: Usefulness of BSD/Linux Source Knowledge (was BSD vs. LINUX)
Date: 26 Jul 1994 22:14:39 -0500
Organization: NeoSoft Internet Services   +1 713 684 5969
Lines: 25
Message-ID: <314jev$e82@Starbase.NeoSoft.COM>
References: <30jqp1$ees@grex.cyberspace.org> <30pn0a$9rf@hermes.unt.edu> <CtEuyA.En1@world.std.com> <1994Jul24.185248.5906@escape.widomaker.com>
NNTP-Posting-Host: starbase.neosoft.com

In article <1994Jul24.185248.5906@escape.widomaker.com>,
Shannon Hendrix <shendrix@escape.widomaker.com> wrote:
>Linux is probably more applicable to the future of UNIX than BSD.  It's
>following POSIX very closely and all other OS are going that way too.

POSIX is for applications. You write your application to the POSIX model
and hope that it works on POSIX systems. Problem is that POSIX has holes
in it you could fly an Airbus 320 through. On autopilot.

In terms of real portability, about the best you can do is assume V7
semantics (since everyone just about started with V7), wrap your tcp code
up in something that hides streams versus sockets, wrap your ioctls up
in something that hides SV versus BSD versus POSIX, punt on job control
(POSIX isn't quite like anything that really exists, and all the emulations
require tweaking), make sure your prototypes are guarded against a K&R
compiler so your code will run on SunOS, avoid doing anything from a
signal routine except (1) set a variable of type sig_atomic_t, or (2)
do a longjmp out of a pending read.

And for god's sake don't pass an uncast null pointer to *anything*.

There are NO pure System V ports. They all have ever increasing gobs of
BSD code glommed on the side.

It's *tough* writing portable code, and it's not going to get any easier.