Solved

Environment Variable from C program

Posted on 1997-11-19
2
202 Views
Last Modified: 2010-04-21
I would like to export a shell variables from a C program but
when program exits variable is not set. Is somebody has an idea ?
0
Comment
Question by:pla
2 Comments
 

Accepted Solution

by:
xilef earned 50 total points
ID: 2007900
This does not work, because every process has its own environment. As soon as your process exits, its environment is gone.

More information can be found in the UNIX Programming FAQ: http://www.erlenstar.demon.co.uk/unix/faq_2.html#SEC7

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 2007901
It's not easy, but it's not impossible.
exec program :-)
(of course you need additional hacking in your C code to get
work, even as one would expect it working)
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Audit HISTFILE for all users on AIX 9 134
Linux :how to provide sudo access to the user 13 98
auto mounter on solaris 1 61
SQUD PROXY SERVER, UNIX, SLL/HTTPS 5 96
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question