One of my colleagues was/is trying to run R via a WWW perl script. The way
our system is configured (and I have no control over this), he ends up
in a process where the HOME environment variable is not set. When he
tries to run R all he gets is a core dump.
A regular user can verify this by just unsetting the HOME variable and
trying to run R.
The problem is in the system.c file, in the following lines,
if (LoadInitFile) {
if ((fp = R_fopen(".Rprofile", "r")))
return fp;
sprintf(buf, "%s/.Rprofile", getenv("HOME"));
if ((fp = R_fopen(buf, "r")))
return fp;
}
I won't suggest a fix (because everyone has their favorite ways of
dancing around error returns from system calls), but I think there
needs to be a small test for a null return from getenv.
(Once I discovered this we "solved" the problem by setting the HOME
variable in the perl script which calls R).
Regards, --Mike
Mike Meyer, Applied Statistics, The Boeing Company
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._