diff options
author | 2003-11-10 21:24:30 +0000 | |
---|---|---|
committer | 2003-11-10 21:24:30 +0000 | |
commit | d29028ce9c09c696752f75014ae76ac28e5419e3 (patch) | |
tree | d0724456b36a347ab56095d284bae4e9a9443bf5 | |
parent | A futile attempt to make very clear that, for upgrades to work, you really (diff) | |
download | wireguard-openbsd-d29028ce9c09c696752f75014ae76ac28e5419e3.tar.xz wireguard-openbsd-d29028ce9c09c696752f75014ae76ac28e5419e3.zip |
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.
-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; } } |