DynamoRIO / DynamoRIO/drmemory
support running shell built-ins
- Dominant language
- C
- Stars
- 2.7k
- Forks
- 290
- PR merge metrics
- No merged PRs in 30d
Description
_From [derek.br...@gmail.com](https://code.google.com/u/117968039472581148324/) on December 10, 2010 17:57:58_
PR 459374
drmemory.sh bails if it can't find a file corresponding to the app to be
run: but some shell built-ins will work properly. e.g., "time", or
"setsid". we should let it run, and either handle a blank app in
the scripts or pass the shell name?
when I do:
$exepath = $ENV{'SHELL'} if (! -e $exepath)
then:
./drmemory.pl -dr /dr -ops "-pause_at_uninitialized" ./x.sh
=> works, but complains "objdump: ./x.sh: File format not recognized"
./drmemory.pl -dr /dr -ops "-pause_at_uninitialized" setsid ./x.sh
=> just exits: exec fails on "setsid": need to run as '/bin/ash -c "setsid ./x.sh'
# PR 459374: support running shell built-ins and scripts
# $exepath = $ENV{'SHELL'} if (! -e $exepath)
# FIXME: not so sure we should support that: we'd have to run
# with -c "cmdline" for some shells, which might conflict w/ quoting
# in the app args: seems reasonable to require user to pass us a
# real executable, so must prefix scripts with shell or perl.
yet this results in "Segmentation fault" (note: need extra layer of quotes):
./drmemory.pl -v -dr /dr -- /bin/ash -c '"setsid ./x.sh"'
TODO: analyze seg fault
TODO: document what we support and how to run scripts
_Original issue: http://code.google.com/p/drmemory/issues/detail?id=140_
Contributor guide
Assessment
This issue has not been assessed yet.