at command and LD_LIBRARY_PATH

I’m hoping someone can explain this. When using the at command, all environment variables are to be preserved ( I thought ). This does happen, except for LD_LIBRARY_PATH.

If I do the following
[INDENT]$export LD_LIBRARY_PATH=/opt/oracle/product/instantclient
$set | grep _PATH
$at now
warning: commands will be executed using /bin/sh
at> set | grep _PATH
at> <EOT>
job 34 at 2009-09-02 14:55

[/INDENT]What I get is:

Can anyone explain what happened to LD_LIBRARY_PATH?

My appreiciation in advance.

Ron <>

That’s an interesting discovery. My guess is that at filters out that variable, for some reason or other. Unfortunately it’s hard to search for any info about the at command due to the short name. Maybe read the source?

Googled on “LD_LIBRARY_PATH”+“at command” second hit;

“If the user submitting the at job is not the super-user, variables
that alter the behaviour of the loader 8 ), such as
LD_LIBRARY_PATH, cannot be recorded and restored by at.”

Yours was the first :wink:

Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.2 Milestone 6 (i586) Kernel 2.6.31-rc7-4-desktop
up 0:47, 2 users, load average: 0.05, 0.05, 0.09
ASUS eeePC 1000HE ATOM N280 1.66GHz | GPU Mobile 945GM/GMS/GME

Good find.

@ronlm1: There is no problem though in specifying the LD_LIBRARY_PATH inside the commands run by at.

Thanks all, that answers it. I did google it, but apparently, not very well.

Appreciate everyone’s response.