lkml.org 
[lkml]   [2006]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Add a /proc/self/exedir link
> bin/foo calls bin/bar refering to /proc/self/fd/999
> bin_2/bar does dup2(open(get_my_exedir()), 999) ***FUBAR***

So don't do that. Treat it as the same case as sending a file path via
RPC: make sure it's resolved relative to the namespace the program is in
and not anything under /proc/self.

In practice most desktop apps use "prefix paths" to locate their own
data files. They don't usually send those file paths to other processes,
not even in the case of things like GIMP plugins.

So whilst I agree you have identified a place where it breaks, I don't
think it invalidates the scheme.

> There may be no "real path" corresponding to /proc/self/fd/4711.

Only in a pathological case like running a program that you then rm -rf
the prefix of, in which case, you lose whatever happens.

> IMO it's still best to just symlink the program directory to the correct
> place and make the programs search in e.g. ~/opt/ and /opt/.

That also suffers from namespace conflicts ;)

thanks -mike
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-07 01:28    [W:0.045 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site