On 24 January 2018 at 07:55, William Dunlap wrote:
| On Linux you can trace all the getenv calls with ltrace.  It only
| works on ELF files, not sh scripts:
| 
| % R CMD ltrace -e getenv `R RHOME`/bin/*/R
| libR.so->getenv("R_HOME")
|                = "/home/R/R-3.4.3/lib64/R"
| libR.so->getenv("R_TRANSLATIONS")
|                = nil
| libR.so->getenv("R_PLATFORM")
|                = "x86_64-pc-linux-gnu"
| libR.so->getenv("R_PAPERSIZE")
|               = "letter"
| libR.so->getenv("R_PAPERSIZE")
|               = "letter"
| libR.so->getenv("R_PRINTCMD")
|                = "lpr"
| libR.so->getenv("R_RD4PDF")
|                = "times,hyper"
| ...

A+ suggestion.

I was thinking about strace and filtering that, but was unaware of its ltrace
trick. Very nice---thanks, Bill!

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to