Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Test failure in redirect.
- X-seq: zsh-workers 16559
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: Zefram <zefram@xxxxxxxx>
- Subject: Re: Test failure in redirect.
- Date: Tue, 5 Feb 2002 02:31:30 +0000
- Cc: Felix Rosencrantz <f_rosencrantz@xxxxxxxxx>, zsh-workers@xxxxxxxxxx
- In-reply-to: <20020204210337.GA4456@xxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20020131064103.12082.qmail@xxxxxxxxxxxxxxxxxxxxxxx> <1020204184533.ZM24919@xxxxxxxxxxxxxxxxxxxxxxx> <20020204210337.GA4456@xxxxxxxx>
On Feb 4, 9:03pm, Zefram wrote:
} Subject: Re: Test failure in redirect.
}
} Bart Schaefer wrote:
} >} print foo >&-
} >} Error output:
} >} (eval):print:1: write error: bad file descriptor
} ...
} >+ /* Testing EBADF special-cases >&- redirections */
} >+ if ((fout != stdout) ? (fclose(fout) != 0) :
} >+ (fflush(fout) != 0 && errno != EBADF)) {
}
} I think the error message is correct and should remain; the test data
} is what needs to be fixed.
I don't think so ... closing stdout should not produce an error from a
builtin that does output. E.g. here's bash:
[schaefer@zagzig schaefer]$ echo foo >&-
[schaefer@zagzig schaefer]$ echo $?
0
[schaefer@zagzig schaefer]$
The "print" command has to execute, e.g. in case it's given -P and there
are side-effects of the prompt expansion due to the PROMPT_SUBST option,
but it must not produce any output and it definitely shouldn't return
nonzero.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author