Skip to content
Back to formatted view

Raw Message

Message-ID: <23144.45074.969594.883987@bud.eddelbuettel.com>
Date: 2018-01-24T16:10:58Z
From: Dirk Eddelbuettel
Subject: [R-pkg-devel] Working with R-devel
In-Reply-To: <CAF8bMcY3XCLwY2g1rzo+skBva2wVnacnEUKUPUouTB7x6RyReg@mail.gmail.com>

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 | edd at debian.org