Subject: Re: wrap up of pipe(2)
To: Bill Sommerfeld <sommerfeld@orchard.arlington.ma.us>
From: Andrew Brown <atatat@atatdot.net>
List: tech-userlevel
Date: 10/03/2001 16:44:55
>When I get a chance (and if someone doesn't beat me to it), I'd be
>inclined to make a pass through the section 2 manual pages to improve
>errno clarity..

would this include adding all the possible errno values to all the
syscall man pages?  ioctl, to pick a well known (to me) example, is
documented to possibly "return" an errno of:

	EBADF
	ENOTTY
	EINVAL

but can also "return":

	EBUSY
	EAFNOSUPPORT
	EACCES
	EOPNOTSUPP
	EADDRNOTAVAIL
	ENXIO
	EPERM
	ENOTCONN
	EEXIST
	EIO
	ENOENT

and, of course, EFAULT.  all that, and i'm not even done reading the
ioctl code path.

> - document in intro(2) and elsewhere that, on some architectures, any
>syscall which takes arguments can conceivably return EFAULT if the
>copyin() of the arguments fails.  (In practice, you'll need a
>"special" syscall stub to trigger this).

...and also EFAULT on copyout(), just to be pedantic.  :)

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
andrew@crossbar.com       * "information is power -- share the wealth."