Skip to content
Snippets Groups Projects
Commit 48e44b34 authored by Simon McVittie's avatar Simon McVittie
Browse files

pv-wrap: Accept LD_AUDIT and LD_PRELOAD as delimited lists


This makes it easier to set them up in the wrapper shell scripts without
making use of bash-specific features, which are not completely portable.

For LD_PRELOAD, the separator is either a colon or a space; for LD_AUDIT,
the separator is a colon. There is no facility for escaping the
separators. This matches the behaviour of the environment variables in
glibc ld.so, as implemented in elf/rtld.c.

The usual reason to prefer separate command-line arguments over parsing
is that a single merged argument either requires an escape mechanism or
cannot represent certain data (for instance loadable modules with a colon
in their filenames), but there is no need to try to support things that
glibc doesn't, and glibc doesn't support loadable modules with the
separator in their filenames anyway.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 34498d7d
No related branches found
No related tags found
1 merge request!530Avoid #!/usr/bin/env bash scripts
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment