On Wed, May 28, 2014 at 08:12:05PM +0530, Zubin Mithra wrote:
> Hello,
> 
> >> (The current implementation is just a PoC and I haven't committed
> anything
> >> yet, I'll post a link to the commit as soon as I push it in.)
> >
> > This is your own repo, you can commit often!
> 
> I've added in the code for converting all paths that are printed via
> printpathn(hence, all paths via printpath too). Please find the code at [1].

It would be more convenient to comment the code posted to the list, so I
won't go into details, just write generic comments.

First, printing absolute paths is not the same as printing canonicalized
paths.  The first is straightforward, the second is more complicated and
may produce unexpected results.  For example, do you really want to follow
symlinks when decoding path names passed to open(2)?

Second, readlink("/proc/%u/cwd") may fail for other reasons than
ENAMETOOLONG, including ENOENT (either /proc is not mounted or the process
has been killed).  If for whatever reason it returned a value <= 0, there
is no way to convert a relative path to an absolute one.


-- 
ldv

Attachment: pgpIYIoQz8O0C.pgp
Description: PGP signature

------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to