Advanced and improved absolute paths decoding

Dmitry V. Levin ldv at altlinux.org
Sun Mar 2 16:07:49 UTC 2014


On Sun, Mar 02, 2014 at 01:18:57PM +0100, Philippe Ombredanne wrote:
> On Sun, Mar 2, 2014 at 12:44 PM, Dmitry V. Levin <ldv at altlinux.org> wrote:
[...]
> > The exact output format may vary, but the general idea of strace decoding
> > is to mimic C syntax.  From this PoV, path names should always be enclosed
> > in double quotes.  Unfortunately, in case of -y output this rule hasn't
> > been enforced, so you cannot distinguish a socket with inode 1234567 with
> > a file named "socket:[1234567]".
> 
> The someone naming a file "socket:[1234567]" ought to get at least a
> good slap on the wrist :D

Well, strace is a tool for tracing, not for slapping. :)

> On the other hand, this could be a mistake and one that strace could
> help debug and find
> Now could this be something that could be fixed as part of advanced
> path decoding?
> or is it really worth adding quotes around all decoded "real" paths to
> care for such a rare case?

Given that names readlinked from /proc/<pid>/fd/<fd> are "real" iff they
start with a slash, they actually can be distinguished in the current -y
output format.  It's just not as obvious as other strace output is.


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


More information about the Strace-devel mailing list