[H-GEN] stderr redirection
gjb at yaxom.com
Fri May 29 00:43:40 EDT 2009
On 2009-05-29, Clinton Roy wrote:
> On Fri, May 29, 2009 at 1:40 PM, Russell Stuart
> <russell-humbug at stuart.id.au> wrote:
> > Oh, Clinton beware that both solutions hide the exit status of the make.
> > The exit status returned is that of the tee, which is always 0.
> That is indeed an issue. I can get around it by grepping for 'Error:'
> in the stderr file though.
That seems like an ugly solution if you have to do it regularly (which
is how I interpret the task you're describing). I'd write a small
wrapper in C (but you could do it just as easily in Python, etc) that
ran the make after setting up the file descriptors/pipelines as required
and then exited with the make status. It's a couple of minutes using
the standard templates and eleventy gazillion times simpler than trying
to beat shells into submission.
More information about the General