Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8382287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:53:50+00:00 2026-06-09T16:53:50+00:00

I am writing a daemon process (let’s say pA), which is kicked off by

  • 0

I am writing a daemon process (let’s say pA), which is kicked off by a another process(let’s say pB), in this daemon pA, I want to use getenv to access a evn variable defined in .cshrc, but to my surprise, getenv returns NULL in pA. I write a another standalone program to use getenv to access this same variable, and it works fine. So I want to ask if getenv can’t work in daemon process? How can I access env variables in daemons? thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T16:53:52+00:00Added an answer on June 9, 2026 at 4:53 pm

    Probably not relevant any more, but for the people that come here through search – see the answer here: https://stackoverflow.com/a/11850426/397604

    In Linux, if you only set the variable (or export it) in a bash
    session, it will be available to a kind of “sub” session, which is
    only available to the command you just executed, and nothing else.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a daemon that utilizes inotify to monitor file access and it
First let me say that I know it's better to use the subprocess module,
I am writing a daemon in c++ on linux which would launch many processes.
I am writing a daemon program using python 2.5. In the main process an
I'm writing a daemon to monitor creation of new objects, which adds rows to
I'm in the process of writing a Ruby-based daemon to sit and run on
I am writing my first objective-c daemon type process that works in the background.
I'm writing a new daemon, which will be hosted on Debian Linux. I've found
(Solved already, I'm writing this for the next guy) I was running git daemon
I am creating a daemon process. This process depends on MYSQL, however my process

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.