Subject: Re: wrap up of pipe(2)
To: None <tech-userlevel@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-userlevel
Date: 10/14/2001 16:31:05
> I don't know how this would mix with other two-return-value syscalls.
> I'm not even sure I know which ones they are....  [syscall(2) only
> mentions pipe]

Grepping for retval[1 in /sys/*/*.[csh] and looking at the code for the
hits indicates that, for the source tree I have,

getpid() returns the parent PID as retval[1] if various COMPAT_ foo is
turned on

getuid() returns the euid ditto if ditto

getgid() returns the egid ditto if ditto

pipe(), of course, as discussed

So it looks as though it wouldn't break anything, though much of the
mechanism would have to stay in place if binary compatability with
certain other OSes is turned on.  It's also possible I missed something
that sets the second return value but doesn't use "retval[1" to do so.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B