Gennady
1/18/2005 12:07:00 AM
Erik Veenstra wrote:
>>>>>How can I let Ruby ignore RUBYOPT?
>>>>>
>>>>>Both -T1 and unsetting the environment variable aren't
>>>>>possible in my situation. I don't want the rest of the
>>>>>script to run in safe mode 1 and I don't have control
>>>>>of the environment...
>>>>
>>>>I haven't followed this thread, but since the internal
>>>>ENV only affects the current process and its children,
>>>>can you wrap your program in a script that unsets RUBYOPT
>>>>and then just fork/popen the real program?
>>>
>>>No, I can't. I start ruby.exe from a little FreePascal
>>>program, which does have getenv(), but no such thing as
>>>setenv().
>>
>>Have you checked for putenv()?
>
>
> Briliant idea! And yes, I've checked it. And no, it doesn't
> exist...
>
> gegroet,
> Erik V.
>
>
I can smell a kind of sarcasm here ;-). Anyways, you are welcome.
You can also see into how you launch your ruby from FreePascal, some
exec variants, like execve(), provide the ability to specify
environment for a program you launch. I now recall this mentioned on
some FreePascal forums. (Disclaimer: I do not know FreePascal, I do not
program in Windows).
Sorry if it is of no help either,
Gennady.