Cedric Blancher
2013-05-29 10:30:33 UTC
I'd like to use FPATH in conjunction with namespaces but noticed the
namespaces are not used to locate loadable functions:
strace ~/bin/ksh -c 'PATH=/usr/bin ; FPATH=/usr/lib64/mykshlib ;
namespace aa.bb.cc { hellox ; } ; ' 2>&1 | fgrep mykshlib
stat("/usr/lib64/mykshlib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib64/mykshlib/hellox", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No
such file or directory)
open("/usr/lib64/mykshlib/hellox", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No
such file or directory)
I would like that the namespace identifier is used as directory name,
with any '.' characters replaced by '/'. The strace output would look
similar to this example:
strace ~/bin/ksh -c 'PATH=/usr/bin ; FPATH=/usr/lib64/mykshlib ;
namespace aa.bb.cc { hellox ; } ; ' 2>&1 | fgrep mykshlib
stat("/usr/lib64/mykshlib/aa/bb/cc/", {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0
open("/usr/lib64/mykshlib/aa/bb/cc/hellox", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
open("/usr/lib64/mykshlib/aa/bb/cc/hellox", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
stat("/usr/lib64/mykshlib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib64/mykshlib/hellox", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No
such file or directory)
open("/usr/lib64/mykshlib/hellox", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No
such file or directory)
The goal is to allow larger function libraries to be used.
Ced
namespaces are not used to locate loadable functions:
strace ~/bin/ksh -c 'PATH=/usr/bin ; FPATH=/usr/lib64/mykshlib ;
namespace aa.bb.cc { hellox ; } ; ' 2>&1 | fgrep mykshlib
stat("/usr/lib64/mykshlib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib64/mykshlib/hellox", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No
such file or directory)
open("/usr/lib64/mykshlib/hellox", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No
such file or directory)
I would like that the namespace identifier is used as directory name,
with any '.' characters replaced by '/'. The strace output would look
similar to this example:
strace ~/bin/ksh -c 'PATH=/usr/bin ; FPATH=/usr/lib64/mykshlib ;
namespace aa.bb.cc { hellox ; } ; ' 2>&1 | fgrep mykshlib
stat("/usr/lib64/mykshlib/aa/bb/cc/", {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0
open("/usr/lib64/mykshlib/aa/bb/cc/hellox", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
open("/usr/lib64/mykshlib/aa/bb/cc/hellox", O_RDONLY|O_CLOEXEC) = -1
ENOENT (No such file or directory)
stat("/usr/lib64/mykshlib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib64/mykshlib/hellox", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No
such file or directory)
open("/usr/lib64/mykshlib/hellox", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No
such file or directory)
The goal is to allow larger function libraries to be used.
Ced
--
Cedric Blancher <cedric.blancher at googlemail.com>
Institute Pasteur
Cedric Blancher <cedric.blancher at googlemail.com>
Institute Pasteur