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:
parent
8451e2f0fc
commit
ccfe8b12a9
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user