Gentoo Archives: gentoo-dev

From: Kent Fredric <kentfredric@×××××.com>
To: gentoo-dev@l.g.o
Cc: TomWij@g.o
Subject: Re: Can we have process names and stdout / stderr indication to more efficiently parse build logs? (was: Re: [gentoo-dev] rfc: escape sequences in logs)
Date: Wed, 04 Sep 2013 11:45:49
Message-Id: CAATnKFB+et8kdhvK6WFwfyidc-QswVe6aSeQEW2t1xOLuGYzZg@mail.gmail.com
In Reply to: Re: Can we have process names and stdout / stderr indication to more efficiently parse build logs? (was: Re: [gentoo-dev] rfc: escape sequences in logs) by "Michał Górny"
1 On 4 September 2013 21:59, Michał Górny <mgorny@g.o> wrote:
2
3 > And how are you going to implement this? I doubt that fd/vt input has
4 > any sort of 'writing process id' indicator.
5 >
6
7
8 Though granted, my other post is not going to be useful on a line-by-line
9 basis.
10
11 The obvious easy approach is have an exec launcher of some kind that
12 launches processes with IO redirected to an intermediary process that
13 simply prepends arbitrary strings to every line sent to them, prior to
14 those processes piping the data to the final aggregate output.
15
16 But this would require large amounts of pipe work and fork+ipc magic.
17
18 Its surely doable, I recall seeing parts of paludis that do stuff like this.
19
20 Just those pipes are inherently easy to break in my experience.
21
22
23
24 --
25 Kent

Replies