Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Daemon Extensions need more data

    I have a postgres (database) daemon running that has a homemade shared object library which performs some translation duties for my setup.

    I need to pass some information to my library: a path to run from.

    I figure there are a couple ways to get this info to the library, here are some ideas:
    (1) Pass it through the postgres daemon
    (2) have the library read a file
    (3) have the library get an environment variable

    I don't really want to rewrite postgres, so option 1 is mostly out.
    A configuration file would work.
    I tested option 3 and it worked, but it didn't do what I expected.

    More on option 3: The environment variable idea doesn't work from the caller's environment, but from the daemon's environment. Duh. Well, that is all well and good, but it would be nice to vary the setting on a per user basis.

    I'm somewhat confused on how to do this right. Is there an elegant way to get at the caller's environment to modify the operating paramters of a daemon?


    BTW, this is my first post. Please enlighten me if I've committed any sins.

  2. #2
    I probably should have put this in Linux Programming & Scripting.

    If a moderator sees this, pls move it there.

Posting Permissions

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