Inserting arbitrary messages into strace output

Dmitry V. Levin ldv at altlinux.org
Mon Dec 22 23:31:58 UTC 2014


On Mon, Dec 22, 2014 at 04:52:22PM -0500, Justin Dearing wrote:
> On Thu, Dec 18, 2014 at 11:04 PM, Dmitry V. Levin wrote:
> 
> > Unlike -42, which is treated as unsigned int (i.e. 2^32-42) by the kernel,
> > -1 is never a valid file descriptor.
> >
> Ok that makes sense. So how about a command line switch that specifically
> intercepts write (-1, msg)  and print out the entire contents of msg,
> regardless of the formatting of the rest of the output?

strace already supports output filtering via -o| option which is
capable of much more sophisticated filtering than transforming
write(-1) lines.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20141223/cd769982/attachment.bin>


More information about the Strace-devel mailing list