[jamming] external program output -> variable

Vladimir Prus ghost at cs.msu.su
Wed May 5 02:57:15 PDT 2004


Ingo Weinhold wrote:
> On Wed, 5 May 2004, Vladimir Prus wrote:
> > Igor Bukanov wrote:
> > > But Jam already knows know to execute actions and extending that code
> > > with piping should not be that difficult on unix/windows AFAIK.
> >
> > Sure, not that difficult as to be impossible, but difficult enough so
> > that nobody implement it yet.
>
> Well, that's only partially correct. It is quite simple to implement it on
> platforms that provide popen(). Unless I deleted it accidentially I should
> even have a patch for it lying somewhere on my harddisk.

Right, 'popen' is handy. But last time I tried pipes on Windows, that was much 
more complicated that popen/fork which we have on Unix

> But there are philosophical reasons, why such a feature won't be accepted
> by the maintainer.

Well, 
1. If there's a patch, interested persons can obtain/apply it separately.
2. At least we can get this patch in Boost.Jam...

> > The question that bothers me, for example, is: do you catch stdout, or
> > stdout and stderr? And if you catch both, you need to make sure the
> > forked process is not blocked writing to stderr, while jam is blocked
> > reading from stdout.
>
> In doubt the user can just redirect stderr.

I'd prefer that Jam handle this issue itself, e.g. by making redirection 
itself, so the user does not have to think about redirection in 100 different 
places.

- Volodya



More information about the jamming mailing list