Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_linux_programming thread: linux system call UNIX compatible?


Message #1 by seeshulee@y... on Fri, 12 Jan 2001 05:43:52 -0000
Leaving aside the standard C library, which is of course very compatible,
all the Linux system calls are based on the same specification as all UNIX
systems. This was originally called SPEC 1170 (there were 1170 system
calls!).
You can find an online copy of the latest version at
http://www.opengroup.org and it's called The Single UNIX Specification.
Porting code between Linux and most UNIX systems is very easy.

Threads. Most Linux distributions offer good support for Linux threads
these days, the interface is based on the IEEE POSIX P1003.1c standard. A
crude check is to see if you have a pthread.h include file, and if the
define _POSIX_VERSION is >= 199506L. Beginning Linux Programming has a
whole chapter (11) on programming threads. Beware it's easy easy to write
programs with subtle bugs when using threads. As Alan Cox said "how to
shoot yourself in both feet at once". Using processes is generally a much
safer approach.

  Return to Index