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
GNOME2_PATH=/usr/local:/opt/gnome:/usr
GTK_PATH=/usr/local/lib/gtk-2.0:/usr/lib/gtk-2.0
LD_LIBRARY_PATH=/opt/oracle/product/instantclient
PKG_CONFIG_PATH=/opt/gnome/lib/pkgconfig:/opt/gnome/share/pkgconfig
_=LD_LIBRARY_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:
GNOME2_PATH=/usr/local:/opt/gnome:/usr
GTK_PATH=/usr/local/lib/gtk-2.0:/usr/lib/gtk-2.0
PKG_CONFIG_PATH=/opt/gnome/lib/pkgconfig:/opt/gnome/share/pkgconfig

Can anyone explain what happened to LD_LIBRARY_PATH?

My appreiciation in advance.

Thanks,
Ron <ron@mideiros.net>

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?

Hi
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 ld.so( 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.

Ron