=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/sftp.c,v retrieving revision 1.21.2.2 retrieving revision 1.21.2.3 diff -u -r1.21.2.2 -r1.21.2.3 --- src/usr.bin/ssh/sftp.c 2002/05/17 00:03:24 1.21.2.2 +++ src/usr.bin/ssh/sftp.c 2002/06/26 18:22:36 1.21.2.3 @@ -24,7 +24,7 @@ #include "includes.h" -RCSID("$OpenBSD: sftp.c,v 1.21.2.2 2002/05/17 00:03:24 miod Exp $"); +RCSID("$OpenBSD: sftp.c,v 1.21.2.3 2002/06/26 18:22:36 miod Exp $"); /* XXX: short-form remote directory listings (like 'ls -C') */ @@ -47,8 +47,10 @@ connect_to_server(char *path, char **args, int *in, int *out, pid_t *sshpid) { int c_in, c_out; + #ifdef USE_PIPES int pin[2], pout[2]; + if ((pipe(pin) == -1) || (pipe(pout) == -1)) fatal("pipe: %s", strerror(errno)); *in = pin[0]; @@ -57,6 +59,7 @@ c_out = pin[1]; #else /* USE_PIPES */ int inout[2]; + if (socketpair(AF_UNIX, SOCK_STREAM, 0, inout) == -1) fatal("socketpair: %s", strerror(errno)); *in = *out = inout[0];