How might it be possible to alter some variable in the env of an already running process, for example through /proc/PID/environ? That "file" is read-only.
Need to change or unset the DISPLAY variable of a long-running batch job without killing it.
How does one go about getting a new environment variable picked up system-wide without restarting the server?
As its an Ubuntu 11.x server, I'm using Upstart to start/restart processes.
I added a new environment variable to /etc/environment that needs to be picked up by one of my app's processes.
If I start the process directly from my shell, the variable is being picked up and all is fine (I'v
I have a parent process running as 'root' user. After fork(), execl() and setuid()/setgid, the child process is started as another OS user (say user1).
Printing the environment -- this is same as the root environment ('logname=root') and not 'logname=user1' ?
Is there a way to read the environment of 'user1' in the child process ?
Balu
I am new babe to Linux. So please skip to read if you are not patient with begineer.
Let's say I am asked to check and shut down the processes that I am not familiar with.
So when I ls under bin folder, I see multiple process .sh.
i want to write a C program to append a string to PATH Environment variable.
something like "export PATH=$PATH:$HOME/mylib"
i have C code like this
setenv("PATH", "$PATH:$HOME/mylib",1); //which does not work.
other work arround i thought was get PATH and HOME using getenv() and create a memory in heap then append them using strcat().
I might have to update PATH many times in my code: so th
Hi,
We used to use the below commands often.
Code:
ps -ef|grep [a]bc
ps -ef|grep abc|grep -v grep
Both fairly returns the same result.
For example, the process name is dynamic and we are having the process name in a variable, how we can apply the above trick.
For example "a" is the variable which contains the process name abc, then
Code:
ps -ef|grep $a|grep -v grep
This w
I'm pretty new to Apache Tomcat and somewhat new to Linux altogether. I am trying to install the JDK, which is a prereq for Apache Tomcat. I downloaded and untarred the JDK to /usr/java and now I'm trying to set the environment path.
I apologize if this is an overly-long question, but this is detailed, complex stuff I'm wading in:This is from Chapter 1 of the GNU/Linux tutorials:1.5.3. "$PATH" variableWhen you type a command into the shell, the shell searches the command in the list of directories contained in the "$PATH" environment variable.
I just installed picc-9.82.9453-linux.run from Microchip website, and at the end it asked me
==> NOTE: You may wish to add the following
/usr/hitech/picc/9.82/bin
to your PATH environment variable.
What does it mean?