Results 1 to 5 of 5

Thread: at command and LD_LIBRARY_PATH

  1. #1

    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>

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    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?

  3. #3
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    32,352
    Blog Entries
    15

    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


  4. #4
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    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.

  5. #5

    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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •