openSUSE Forums > Programming/Scripting » at command and LD_LIBRARY_PATH

Go Back   openSUSE Forums > Programming/Scripting
Forums FAQ Members List Search Today's Posts Mark Forums Read


Programming/Scripting Questions about programming, bash scripts, perl, php, cron jobs, ruby, python, etc.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-Sep-2009, 17:02
Puzzled Penguin
 
Join Date: Sep 2009
Posts: 2
ronlm1 hasn't been rated much yet
Default 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
$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
$

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>
Reply With Quote
  #2 (permalink)  
Old 02-Sep-2009, 18:03
Flux Capacitor Penguin
 
Join Date: Jun 2008
Location: GMT+10
Posts: 5,232
ken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud of
Default Re: at command and LD_LIBRARY_PATH

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?
Reply With Quote
  #3 (permalink)  
Old 02-Sep-2009, 22:35
malcolmlewis's Avatar
Global Moderator
 
Join Date: Jun 2008
Location: Podunk
Posts: 4,710
malcolmlewis has great reputationmalcolmlewis has great reputationmalcolmlewis has great reputationmalcolmlewis has great reputationmalcolmlewis has great reputationmalcolmlewis has great reputation
Default Re: at command and LD_LIBRARY_PATH

Quote:
Originally Posted by ronlm1
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
$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
$

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>
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

--
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

Reply With Quote
  #4 (permalink)  
Old 02-Sep-2009, 23:49
Flux Capacitor Penguin
 
Join Date: Jun 2008
Location: GMT+10
Posts: 5,232
ken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud of
Default Re: at command and LD_LIBRARY_PATH

Good find.

@ronlm1: There is no problem though in specifying the LD_LIBRARY_PATH inside the commands run by at.
Reply With Quote
  #5 (permalink)  
Old 03-Sep-2009, 15:46
Puzzled Penguin
 
Join Date: Sep 2009
Posts: 2
ronlm1 hasn't been rated much yet
Smile Re: at command and LD_LIBRARY_PATH

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

Appreciate everyone's response.

Ron
Reply With Quote
Reply

Bookmarks

Tags
ld_library_path


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2