The socketpair(0 syscall is bogusly returning the fd numbers through

the primary and secondary return codes, causing it to not behave as
documented.  This probably originates from the ancient BSD kernels that
had pipe(2) implemented by socketpair(2), there are no binaries left that
we can run that do this.

Pointed out by: Robert Withrow <witr@rwwa.com>, PR#731
This commit is contained in:
Peter Wemm 1996-08-24 03:35:13 +00:00
parent 3bd9f6db7a
commit b12e5e82b6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=17804

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)uipc_syscalls.c 8.4 (Berkeley) 2/21/94
* $Id: uipc_syscalls.c,v 1.17 1996/05/09 20:14:59 wollman Exp $
* $Id: uipc_syscalls.c,v 1.18 1996/07/11 16:32:02 wollman Exp $
*/
#include "opt_ktrace.h"
@ -370,8 +370,10 @@ socketpair(p, uap, retval)
goto free4;
}
error = copyout((caddr_t)sv, (caddr_t)uap->rsv, 2 * sizeof (int));
#if 0 /* old pipe(2) syscall compatability, unused these days */
retval[0] = sv[0]; /* XXX ??? */
retval[1] = sv[1]; /* XXX ??? */
#endif
return (error);
free4:
ffree(fp2);