🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.sys5
Article #1095

What's a system call ( Was: 'what' doesn't use perror...)

#1095
From: Andy Sherman
Date: Tue, 09 May 1989 19:00
23 lines
1926 bytes
In article <1350@frog.UUCP> john@frog.UUCP (John Woods) writes:

   "system call" is not well enough defined to be the determinant of whether
   errno is usable or not (after all, why IS open() a system call, and why
   IS NOT fopen() a system call?).  What you ought to rely on is what a common
   manual documents.

A system call is a subroutine documented in Chapter 2. :-)

Actually, a system call is an entry point which is a one-for-one mapping to a
particular kernel service.  Open(2) is a system call which returns a file
descriptor, which is a kernel data structure.  Fopen(2) on the other hand
returns a non-kernel data structure called a stream, which is typedefed as
FILE in stdio.h.  One field in the structure is the file descriptor, and one
piece of fopen is a call to open to get that file descriptor.  System functions
are the primatives which are used either by themselves or implicitly by 
subroutines which add some value.  (For another example, compare the 
execve(2) system call with the various execxxx(3) subroutines.)
-- 
Andy Sherman/AT&T Bell Laboratories/Murray Hill, NJ           *NEW ADDRESS*
AUDIBLE:  (201) 582-5928                                      *NEW PHONE*
READABLE: andys@ulysses.ATT.COM  or att!ulysses!andys         *NEW EMAIL*
The views and opinions are my own.  Who else would want them? *OLD DISCLAIMER*
Technical Details
Message-ID: <11506@ulysses.homer.nj.att.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!ulysses!andys
References: <3759@sugar.hackercorp.com> <10156@smoke.BRL.MIL> <1153@aplcen.apl.jhu.edu> <1350@frog.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!ulysses!andys
From: andys@ulysses.homer.nj.att.com (Andy Sherman)
Newsgroups: comp.bugs.sys5
Subject: What's a system call ( Was: 'what' doesn't use perror...)
Message-ID: <11506@ulysses.homer.nj.att.com>
Date: 9 May 89 19:00:49 GMT
References: <3759@sugar.hackercorp.com> <10156@smoke.BRL.MIL> <1153@aplcen.apl.jhu.edu> <1350@frog.UUCP>
Organization: AT&T Bell Laboratories, Murray Hill
Lines: 23
In-reply-to: john@frog.UUCP's message of 1 May 89 20:54:00 GMT