I need to use a particular libc to run a tool (cp). The problem is that this tool has to be used as argument of another tool (for example timeout) and I don't want to use the modified libc with this one.
I tried to do:
timeout 10 LD_LIBRARY_PATH=/path/to/mod/libc/ cp a b
But I received the error:
timeout: failed to run command 'LD_LIBRARY_PATH=/path/to/mod/libc/': No such file or directory
And, as I said, I can't do:
LD_LIBRARY_PATH=/path/to/mod/libc/ timeout 10 cp a b
as timeout would use the modified libc. Is there any way to do this?