diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2003-11-10 21:24:31 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2003-11-10 21:24:31 +0000 |
commit | 507ab8275b041b65d552f065abafff05c014342e (patch) | |
tree | c93abd1d03a4e0585e1185983aa4ad83b6122c33 /bin/ksh | |
parent | 092d104c07837eec22c4df9755d67151442957bd (diff) |
For the >& and <& operators, add a check for "dup from" == "dup to" and
just return success if they are the same. Fixes the "ls 2>&2" problem
miod@ found.
Diffstat (limited to 'bin/ksh')
-rw-r--r-- | bin/ksh/exec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/ksh/exec.c b/bin/ksh/exec.c index 6a5e0447d1c..f3192a516c8 100644 --- a/bin/ksh/exec.c +++ b/bin/ksh/exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec.c,v 1.28 2003/10/22 07:40:38 jmc Exp $ */ +/* $OpenBSD: exec.c,v 1.29 2003/11/10 21:24:30 millert Exp $ */ /* * execute command tree @@ -1355,6 +1355,8 @@ iosetup(iop, tp) snptreef((char *) 0, 32, "%R", &iotmp), emsg); return -1; } + if (u == iop->unit) + return 0; /* "dup from" == "dup to" */ break; } } |