General :: Running Program In Background In Child Emulator Process

Aug 26, 2009

I wonder how one can, if at all, run an X program in the background *in an emulator sub-shell process*. What I mean is to launch a program in an emulator, e.g, by xterm -e gedit

but with gedit (in this example) running in the background from inside the xterm sub-process, so that the xterm will accept other commands. In the above, gedit will run in the foreground, and of course, if you do
xterm -e gedit &

then xterm will run in the background, not gedit.In short, I would like to achieve the same thing as "gedit &" as you manually do in xterm, but from another shell. What I aim to do is write an X init script to achieve this result (to have the emulator open and a program or two running from it, in the background, at the X startup).

View 2 Replies


ADVERTISEMENT

General :: Way To See Only Process Running In Background?

Feb 23, 2011

Is there some way to see only the process running in the background?

View 4 Replies View Related

General :: Running Process In Background

Jan 14, 2011

Is there any way to run a long process in background so that it still remain in running state even if the user logout the system.

View 12 Replies View Related

General :: Difference Between Child THREAD And Child PROCESS?

Jul 30, 2009

I am troubleshooting something and I got this problem.

If I do "pstree -p"

It shows,

Code:

[code]....

However, it does NOT show up in "ps -elf"

Code:

ps -elf | grep soffi
0 S whho 7734 1 0 80 0 - 36435 - 11:14 pts/2 00:00:03 /usr/lib/openoffice/program/soffice.bin -splash-pipe=5
0 S whho 7833 7759 0 80 0 - 751 - 11:21 pts/3 00:00:00 grep soffi

I was wondering if 7735, 7736, 7737, 7743 were really processes. Then I checked /proc, I could cd to /proc/7735, /proc/7736, etc, but I could not ls them out. I looked at the man page of "pstree", it says,

Code:

Child threads of a process are found under the parent process and are shown with the process name in curly braces, e.g.

icecast2---13*[{icecast2}]

So, what does all this mean? Does it mean that 7735, 7736, 7737, 7743 are just threads but not processes? If so, why could I cd to /proc/<id> but not see them in "ps -elf".

View 10 Replies View Related

General :: Move Running Process To Background

Mar 10, 2011

How do you move a running process to the background? For example, type the command sleep 60 on the command line and try moving that process to the background.

View 1 Replies View Related

Programming :: Under Which Circumstances A Child Process Creates Another Child Process Using Fork

Dec 7, 2009

Consider the following code:

Code:

int main()
{
int i=0;
pid_t pid;
for(i=0;i<2;i++)

[code]....

I get the following output:

Parent: chid_pid=4356 i=0 parent's pid=4355
This is child 4356 i=0
This is child 4357 i=1

[code]....

I can observe instead of two children(as I expect) processes there are three. This is because child process 4356 creates its own child. Why all the messages of the type "This is child X i=Y" are concentrated one under another? How exactly fork works? Is affected by the fact that I have a dual-core processor?

View 3 Replies View Related

General :: Sending Signal From Child Process To Parent Process?

Sep 8, 2010

Code:

#include <stdio.h>
#include <unistd.h>
#include <signal.h>

[code]....

Description of what the code does or what i intended to do:

1. Created a child process from parent process using 'fork()'

2. Sent a signal 'SIGALRM' from child process to parent process using 'sigqueue' function.

(The Third parameter of 'siqueue' function contains the message (message msg) which the child process wants to send to the parent process.'msg' is a stucture instance containing a) pid of child and b) string) 5. Print the 'msg' sent by child process inside the signal handler function 'sig_action_function' of the parent process I am getting some junk value when this line is executed

Code:

printf("%d
",msg->cpid);

I expected to get the pid of child process, which the child process sent to parent process through the signal.

View 3 Replies View Related

Programming :: Creates A Child Process With Fork And, When The Child Ends, Receives The SIGCHLD Signal And Wait For Its Termination?

May 23, 2011

I have a doubt about signals in C programming. I have done this little program to explain it. It creates a child process with fork and, when the child ends, receives the SIGCHLD signal and wait for its termination.Ok, quite easy, BUT when I execute this code the SIGCHLD signal is received twice, first as an error (returns -1) and the second one to finish the child process.I don't understand the meaning of the first received signal. Why is it generated? Is the code wrong? (if you add the SIGINT and press Ctrl+C during the execution it also receives two signals instead of one)

Code: #include <stdio.h>
#include <unistd.h>
#include <string.h>

[code]....

View 4 Replies View Related

General :: Limit The Upload / Download Of A Program Already Running (A Process)?

Jun 2, 2011

I have already tried trickle and wondershaper. I need a program that can limit the speed of download/upload of an already running program. Similar to the how NetLimiter in Windows limits already running processes. Using Linux.

View 1 Replies View Related

Programming :: Running Program In Background From Script

Mar 27, 2011

I have a script that calls another program/script, xxx, to run in the background. Supposedly this program at most should finish within five (5) minutes so after five (5) minutes, I run some other steps to run the script into completion. My problem is sometimes the program takes longer than five (5) minutes and this is causing problems when running the rest of the steps in the scripts. Can anyone suggest how to re-program my script. At the moment, the KSH script, i.e. test.ksh, is doing as below:

test.ksh:
.....
.....
xxx/xxx.ksh <--- program/script called by the script
sleep 300
..... run the rest of the script .....
..... problem is sometimes xxx/xxx.ksh takes longer than 300 seconds .....
..... any way that I can monitor that xxx/xxx.ksh finishes before I run .....
..... the rest of the scripts .....

View 3 Replies View Related

General :: Killing Parent Process Without Killing Child Process (Linux C Programming)?

Mar 10, 2011

I want to kill parent process after "fork()" method. but if I kill parent process with "exit(0)" method, main() thread is terminated as well so child prosess doesn't work anymore. Is there any way to kill only parent process without affecting to child process?

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

[code]....

View 1 Replies View Related

Server :: Running CentOS 5.4 - SpamAssassin & SendMail - Starting Spamd: "child Process [3956] Exited Or Timed Out Without Signaling Production Of A PID File"

Mar 26, 2010

Brand new to Linux. Sort of got thrown in front of the bus if you know what I mean. The company I work for has a Linux server running CentOS 5.4 Company uses Linux for their Email, FTP and Web Server. Have been here a few years dabbling in and out of Linux and now that the old Admin has left the company.....I need to learn it ASAP. The server has run pretty solid until today.

The email server runs SendMail and SpamAssasin. Received lots of complaints today regarding extra SPAM. Noticed that SpamAssassin was not running. Tried to restart it through the WebMin tools and got the following error: Starting spamd: child process [3956] exited or timed out without signaling production of a PID file: exit 255 at /usr/bin/spamd line 2588.

View 1 Replies View Related

General :: Child Process That Dies And Has No Parent?

Dec 17, 2010

What happens to a child process that dies and has no parent process to wait for it and what's bad about this?

View 2 Replies View Related

General :: Child Process Does Not Core Dump

Jul 27, 2011

In my program, I fork() to get a child process. Because of some problem, child process terminates by a segmentation fault. Parent process is still running. I have compiled my code with -g option. I have done: ulimit -c unlimited. I am not getting core dump of the child process. How can I get the core dump of child process?

View 1 Replies View Related

General :: Command Line For Child Process

May 20, 2011

I have created three child process from one parent. And different child has different functions. Child 2 has got function to load file called "wc" to count file1 and and its required to get their files by command line arguments. I can get the files through command line but couldn't get the files when child 2 process start.

View 9 Replies View Related

General :: Command To Find Parent And Child Process?

Apr 21, 2011

I have a script that calls other scripts/commands which may or may not spawn other process. From my understanding, when I do a ps -ef, the highest numbered process ID is supposed to be the parent ID of all the other related child processes, is this correct? In most or all circumstances, I do a ps -ef | grep <processid> of my script and anything that spawns off that process IDs I assumed are the child processes of my script. If I want to terminate my script and all other child processes, then I kill the parent ID which is the highest numbered PID and this will subsequently kill all other child process IDs, is this correct?

Now, my question is whether there is any quick way of showing what are the child processes of a parent ID instead of what am currently doing now which is visually checking which one is the parent ID and "assuming" that the highest numbered PID is the parent ID of all the other processes. Below is a sample output of running ps -ef | grep exp | grep -v grep. I assume from the output below that the parent process/ID is PID 11322, is that correct?

Code:

oracle 11154 11153 0 21:20 ? 00:00:00 /bin/sh -c (. ~oracle/.profile; /bin/ksh /usr/local/oracle/scripts/expdp_o
oracle 11155 11154 0 21:20 ? 00:00:00 /bin/sh -c (. ~oracle/.profile; /bin/ksh /usr/local/oracle/scripts/expdp_o
oracle 11190 11155 0 21:20 ? 00:00:00 /bin/ksh /usr/local/oracle/scripts/expdp_schema.ksh dev01
oracle 11322 11190 0 21:20 ? 00:00:00 expdp

View 2 Replies View Related

General :: Child Process Can't Print Strings After Call Signal_handler?

Nov 2, 2010

I'm studying about signal in Linux Kernel and I got a problem about signal handler and output buffer.

I just want to know about stdout buffer related parent process and child process.

The problem is - parent process received SIGINT signal_handler that I implement is called. And after signal_handler is called, it print string "pid : xxx state : RUNNING" ... but after end of signal_handler function, child process might be print string but it isn't print at all.

I'm not asking right code, but I want to know why is this happened and concepts about signal handler, buffer - between parent process and child process.

here is a code signal_handler:

Quote:

void TC3_handler()
{
pid_t pid;
ProcState ps;
pid = GetProcessId();

[Code]....

chlid process counts number in infinite loop, but after call signal_handler, it can't print at all.. just waiting for SIGINT..

View 2 Replies View Related

General :: Child Processes Of A Parent Process Occupying Socket Memory?

Jul 22, 2010

I am facing an issue where the process starts hanging. When I closely look at the logs I come to know that some of the child processes that are forked by the parent process are not finished.

1) Is it possible that the child processes that are not finished occupy the socket memory of the parent process and ultimately a point is reached where no socket memory is available to fork new child processes.

2) What is the standard limit of socket memory in linux?

3) What is the fate of such child processes (as I have mentioned above)?

4) How to debug such cases so that the exact problematic area is identified?

View 2 Replies View Related

General :: Find All Child Processes Of A Parent Process Given To Script As Argument?

Feb 15, 2011

well i have just started with shell scripting...how to find all child processes of a parent process given to script as argument.

View 10 Replies View Related

Server :: Program To Fetch PID Of Running Process

Mar 5, 2010

I want to access the process control block to retrieve a process' pid and priority. Any code or the steps to do it.

View 9 Replies View Related

General :: How To Quit QEMU Emulator Running ARM System?

Nov 9, 2010

I can't use shutdown -h now because I don't have permission (or root)the university script I have tells me to use ctrl-alt-delete but that doesn't shut it down like it says it should, instead it restarts it... so whats the safe way of doing this?

View 1 Replies View Related

General :: Run Two Background Process?

Oct 26, 2010

i have ported linux into arm and i want to run two background process on target

i have two c programs a.c and b.c
i have cross compiled them as
arm-linux-gcc -o a a.c

[code]...

View 8 Replies View Related

General :: Run A Process In The Background?

Nov 16, 2010

Could you tell me how can I run a process in the background?

View 1 Replies View Related

General :: Pull Process / Job Into Background

Jan 17, 2011

I know of terminating a command with & and then moving it into the background by pressing Ctrl-Z and then bg [pid], and I also know of nohup. But say you started a process that turned out to take much longer than one expected, is there a way of pulling, so to speak, this process from another terminal screen into the background so that even if I log off from the server the process would continue?

View 2 Replies View Related

General :: Nohup Does Not Run Process In Background

Apr 11, 2011

I run

nohup bash -c "while [ true ]; do echo test; done"

from PuTTy SSH client but after this process is not runned in background instead nohup keeps to be foreground process in shell.

SW version: nohup (GNU coreutils) 8.5

View 1 Replies View Related

General :: Moving A Process To Background Using PID?

Mar 5, 2011

i want to send a running process to background .. normal commands like sleep i can able to move easily to bg .

# sleep 10
#Ctrl+z
#bg

[code]...

View 4 Replies View Related

General :: Process In Background Hogs 96% CPU But When Ran In Foreground Its Almost Zero

May 17, 2010

I am trying to solve one problem: When i run my process in background it hogs around 96% of CPU. But when ran in foreground, CPU utilization is almost zero. Is there any difference b/n a background and a foreground process wrto CPU utilization?

View 8 Replies View Related

General :: Failed To Execute Child Process "realplay" (No Such File , Directory) / What To Do?

Sep 16, 2009

What can I do about this?
Failed to execute child process "realplay" (No such file or directory)

using gdome Ubuntu, realplayer is in my Home folder (RealPlayer11GOLD)

View 3 Replies View Related

Ubuntu :: What Is Child Process - GE Cannot Open

Aug 4, 2010

what is child process - GE cannot open

View 1 Replies View Related

Programming :: SetUID On Different PID Or Child Process

Aug 18, 2010

I have a root process (on linux) that forks a child and the child process then drops privileges by doing a setuid() to a normal user. After the child setuid()'s, it is of course impossible for it to gain root again by itself. But since the main process is still running as root, i was wondering if there was a simple/smart way of getting the root-master-process to elevate the child back to root (or maybe just to another non-privi uid). Is there some way to do a setuid() on another pid? or maybe something can be done through /proc/<pid>/? Killing the child is not an option (because its what it does today and im trying to find a smarter way). (The program is apache2's mpm-itk worker and the "child" is the actual apache2 process serving a page.)

View 11 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved