Displaying 20 results from an estimated 10000 matches similar to: "getenv() can't differentiate "defined but empty" and "undefined""
2023 Jan 31
1
Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '<ff>' if an environment variable contains \xFF
> On 31 Jan 2023, at 12:51 , Tomas Kalibera <tomas.kalibera at gmail.com> wrote:
>
>
> On 1/31/23 11:50, Martin Maechler wrote:
<snippage>
>> hmm.., that's a pity; I had hoped it was a pragmatic and valid strategy,
>> but of course you are right that type stability is really a
>> valid goal....
>>
>> In general, what about behaving close
2013 May 23
0
[LLVMdev] Usage of getenv() inside LLVM and thread safety
Right. glibc's amusing stance is that you setenv/putenv are not thread
safe, but getenv is. I assume Ruby exposes setenv and therefore simply not
calling setenv isn't an option.
Would it solve your problems if all getenv() calls happened at
cl::ParseCommandLineOptions() time?
On Thu, May 23, 2013 at 9:49 AM, Dirkjan Bussink <d.bussink at gmail.com>wrote:
> Hello,
>
>
2013 May 23
4
[LLVMdev] Usage of getenv() inside LLVM and thread safety
Hello,
In Rubinius we're seeing an occasional crash inside LLVM that always happens inside getenv(), which is used for example when creating a MCContext (inside lib/MC/MCContext.cpp, it checks getenv("AS_SECURE_LOG_FILE")).
The problem is that getenv() and friends aren't thread safe and Rubinius provides a multithreaded system. We can relatively easily get locking setup around
2011 Apr 30
1
Sys.getenv at startup is not working properly
Hello,
when using
Sys.getenv() during startup-phase (.First or .Rprofile)
to get the env-variables
COLUMNS as well as HOST I get empty strings.
After the startup is done, when asking via Sys.getenv()
by hand, COLUMNS is set (but HOST is not, even "hostname" on the shell gives me
a correct answer).
At the moment my problem is the missing COLUMNS value during start up,
because I want
2001 Jul 12
1
Sys.getenv
I am running R-1.3.0 on Solaris 8:
Under Solaris I do
setenv dendro_us hoffmann
echo $dendro_us gives back:
hoffmann
which is correct.
When in R I do:
Sys.getenv("dendro_us") I get
dendro_us
""
which is NOT correct:
Inverse effect (taken from help of Sys.getenv)
Under R:
print(Sys.putenv("R_TEST"="testit", ABC=123))
[1] TRUE TRUE
2023 Jan 30
2
Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '<ff>' if an environment variable contains \xFF
/Hello.
SUMMARY:
$ BOOM=$'\xFF' LC_ALL=en_US.UTF-8 Rscript --vanilla -e "Sys.getenv()"
Error in substring(x, m + 1L) : invalid multibyte string at '<ff>'
$ BOOM=$'\xFF' LC_ALL=en_US.UTF-8 Rscript --vanilla -e "Sys.getenv('BOOM')"
[1] "\xff"
BACKGROUND:
I launch R through an Son of Grid Engine (SGE) scheduler, where the R
2011 Nov 15
3
getenv() in plugin not working
Hi - new to the list, can't find much on this using google.
I'm trying to setup the dovecot DRAC plugin as described here:
http://wiki.dovecot.org/HowTo/PopBSMTPAndDovecot#DRAC
DRAC is installed and running using this startup command:
/usr/local/sbin/rpc.dracd -i -e 5 /etc/postfix/dracd.db
I downloaded the drac.c file linked on the above URL: http://www.dovecot.org/patches/1.1/drac.c
2017 Aug 25
0
getOption() versus Sys.getenv
On 25/08/2017 1:19 PM, Sam Albers wrote:
> Hi there,
>
> I am trying to distinguish between getOption() and Sys.getenv(). My
> understanding is that these are both used to set values for variables.
> getOption is set something like this: option("var" = "A"). This can be
> placed in an .Rprofile or at the top of script. They are called like this
>
2023 Jan 31
2
Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '<ff>' if an environment variable contains \xFF
Tomas,
I think you're not addressing the actual issue which is a clear regression in Sys.getenv() [because it used to work and still works for single env var, but not a list] and the cryptic error due to that regression (caused by changes in R-devel). So in either case, Sys.getenv needs fixing (i.e., this should really go to the bugzilla). Its behavior is currently inconsistent.
The quoted
2012 Apr 20
1
R CMD check: Sys.getenv("R_GSCMD") cannot contain full pathname (contrary to docs)
Hi,
in help("R_GSCMD") it says "R_GSCMD: Optional. The path to
Ghostscript, used by dev2bitmap, bitmap and embedFonts. Consulted when
those functions are invoked.". However, if 'R_GSCMD' contains a full
pathname to the Ghostscript executable (as above "path" indicates),
e.g.
> Sys.getenv("R_GSCMD")
[1] "C:\\Program
2017 Aug 25
2
getOption() versus Sys.getenv
Hi there,
I am trying to distinguish between getOption() and Sys.getenv(). My
understanding is that these are both used to set values for variables.
getOption is set something like this: option("var" = "A"). This can be
placed in an .Rprofile or at the top of script. They are called like this
getOption("var").
Environmental variables are set in the .Renviron file
2020 Nov 02
6
unusual use of getenv
Hi folks
I noticed something interesting when debugging a program that uses llvm
for JIT compilation.
Running `ltrace` surfaced a number of `getenv("bar")` calls coming from
llvm. It turns out these are not "real" `getenv` calls, but are an
optimization "do nothing" escape hatch which have been in
`llvm/include/llvm/LinkAllPasses.h` [for over 15years](1) -
2014 Apr 18
3
Can the output of Sys.getenv() be improved?
Within an R session, type Sys.getenv() will list all the environment variables, but each one of them occupies about a page, so scrolling to find one is difficult. Is this because I don't know how to use it or something could be improved? Usually I'm not sure the exact name of a variable but want to look it up. Recently I installed rjags, with the JAGS-3.4.0's lib, include, modules
2020 Nov 02
4
unusual use of getenv
Oh, right, this stuff. I guess the non-windows solution might've been a
volatile read, for instance? So maybe not so much that the general
machinery isn't needed, but that perhaps MSVC does something interesting
with a volatile read or whatever other solution might've been used.
Hmm, not sure why the whole file was added only when MSVC support was added
- if it is a "static
2020 Nov 10
1
unusual use of getenv
Hi Michael
On Tue Nov 10, 2020 at 1:29 AM GMT, Michael Kruse wrote:
> Am Mo., 2. Nov. 2020 um 14:01 Uhr schrieb David Blaikie
> <dblaikie at gmail.com>:
> > Hmm, not sure why the whole file was added only when MSVC support was added - if it is a "static library object file selection" issue. Wouldn't that have turned up on other platforms before that moment?
>
2023 Jan 31
2
Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '<ff>' if an environment variable contains \xFF
>>>>> Tomas Kalibera
>>>>> on Tue, 31 Jan 2023 10:53:21 +0100 writes:
> On 1/31/23 09:48, Ivan Krylov wrote:
>> Can we use the "bytes" encoding for such environment variables invalid
>> in the current locale? The following patch preserves CE_NATIVE for
>> strings valid in the current UTF-8 or multibyte locale (or
2012 May 22
1
Is there an inverse function of Sys.getenv()
Using "Sys.getenv()",
I got a list of 380 environment variables...
Now I open a new R session,
how do I set those environment variables in my new R session using
"Sys.setenv()"?
There is no batch function for "Sys.setenv()"?
Is there an import/export environment variables function?
Basically I want to export all the environment variables from one R
session and
2008 Oct 12
1
Conditionally skip over "for(..){" and "}"??
Hi Folks,
I'm wondering if there's a secret trick to achieve the following.
I have some big code for analysis related to a named variable,
which will be one of several in the columns of a dataframe, and
I would like to be able to choose between a run for just one of
these variables, or a run which loops over them all.
So, for a single run, I could have the following kind of thing
in a
2006 Jun 09
1
Environment variable MAKE not defined on Windows
On Windows,
> Sys.getenv("MAKE")
MAKE
""
when (at a DOS prompt)
X:>set MAKE
Environment variable MAKE not defined
On linux,
> Sys.getenv("MAKE")
MAKE
"make"
even when (in a shell)
% echo $MAKE
returns nothing.
This has consequences, e.g., in buildVignette where
system(Sys.getenv("MAKE"))
dutifully does nothing on
2023 Jan 31
1
Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '<ff>' if an environment variable contains \xFF
On 1/31/23 09:48, Ivan Krylov wrote:
> Can we use the "bytes" encoding for such environment variables invalid
> in the current locale? The following patch preserves CE_NATIVE for
> strings valid in the current UTF-8 or multibyte locale (or
> non-multibyte strings) but sets CE_BYTES for those that are invalid:
>
> Index: src/main/sysutils.c
>