Programming :: Process P4 To Terminates Processes P1, P2, P3 If They Are Running?

Aug 18, 2009

I have p1,p2,p3,p4 some processes created by me in C. p1, p2, p3 are started individually from several consoles. And I want process p4 to terminates processes p1, p2, p3 if they are running. Which is the easiest way to accomplish that? put all processes in the same process group and send from p4 a kill signal to the group. But I couldn't do that because I cannot call successfully setpgid(getpid(), 15000) from p1-p4. It's there some way to put them in the same group? the processes don't have a child-parent relationship, they are launched manually from consoles.

View 1 Replies


ADVERTISEMENT

Programming :: How To Relaunch Process After It Terminates

Mar 1, 2010

I am trying to relaunch a process after it's name, not pid, terminates in C++. Is this possible? I am using g++ 4.3-4.4 on Fedora 10, wandering between my x86 and ppc machines. I just recompile.

View 3 Replies View Related

Programming :: How Do You List Processes - Get A Process's Std - In|out|err - Stream

Jun 3, 2011

How do you list processes, get a process's std(in|out|err) stream, or wait until a process is finished in C?

View 3 Replies View Related

Programming :: Python: List Running Audio Processes?

Jul 19, 2010

I am trying to get a list of running processes using audio (using gstreamer), just like in gnome-volume-control, under applications, but have so far been unsuccessful in finding anything in either the gtk or gstreamer library, anyone out there who can point me in the right direction?

View 1 Replies View Related

General :: Firefox Terminates If Multiple Instances Of Flash Player Running?

Feb 17, 2010

If i have, say, ..... tab opened and if a click on some of the related videos (while it's still playing) firefox terminates. The same if I open ..... on one tab and myspace on another - firefox just shuts down.

I want to know why this happens, is it a bug and how can i fix it ?

View 2 Replies View Related

Slackware :: Firefox Terminates If Multiple Instances Of Flash Player Running?

Feb 17, 2010

..... tab opened and if a click on some of the related videos (while it's still playing) firefox terminates. The same if I open ..... on one tab and myspace on another - firefox just shuts down.I want to know why this happens, is it a bug and how can i fix it ?

View 2 Replies View Related

Programming :: GDB Terminates When Spawned From Shell

Nov 22, 2010

I want to spawn a GDB session from bash script and keep it working to interact it from outside. But when I start it in background (with '&' sigil).

Code: gdb -x gdb_script.txt ./a.out < gdb_pipe.fifo &
It executes passed script and terminates by itself (I do not pass any data or signals to it)

Code: Breakpoint 33, main (argc=1, argv=0xbffff0f4) at main.c:53
---Type <return> to continue, or q <return> to quit---53
read_main_config();
(gdb) quit

A debugging session is active.
Inferior 1 [process 5957] will be killed.
Quit anyway? (y or n) [answered Y; input not from terminal] What can I do to make it alive?

View 1 Replies View Related

Programming :: Get List Of Thread In Running Process?

Jan 27, 2010

How to get list of threads of a process using C code in Linux?

View 6 Replies View Related

Programming :: Alter A Running Process Without Killing It?

Sep 7, 2010

In the comments section of this blog, the commenter "Pratik" claims that you can edit a running bash script, without killing it, and have the changes picked up by the running script. He claims you can do this by editing files in /proc. Now, I know how to find the /proc folder that contains the data on the running process, Code: cd /proc/`pgrep process_name` But I can't figure out what I should do if I want to edit a running bash script.

View 6 Replies View Related

Programming :: Extract The Full Name Of The Process Running In Box?

Jul 11, 2011

I have a requirement where I want to extract the full name of the process running in my box. I tired various options of ps. The wide option gave me the full command but that contains command, the interpreter and also the arguments passed.

Code:

XX XX XX XX XX XX /usr/bin/sh /path/to/exe/myexe.sh arg1 arg2 arg3.

Is there any way from ps or any other command I can extract the full name of the command

Desired Output :

Code:

/path/to/exe/myexe.sh or myexe.sh

View 12 Replies View Related

Programming :: How To Grep Process Running More Than 30 Days Only?

Aug 18, 2009

is there a way for me to grep the process that running more than 30 days only using linux command or script?

example:i do ps -ef to list out the process, then i want to filter only the process that always running more than 30 days..

View 8 Replies View Related

Programming :: Shut Downing Running Process

Apr 15, 2009

I need a help regarding ,how to shutdown the running process using C program?..here i attached the porgram to shutdown the system by c program is there any possible to change in this program to shutdown the process?

View 1 Replies View Related

Programming :: Taking Back Up Of Log File For Running Process?

Feb 16, 2010

I am working in HP UNIX. I have one process which is running continuously.There is log file generated for the process. I want to take back up of file without loosing any logs after particular interval of time or say file size increases more that 1GB.

View 3 Replies View Related

Programming :: Exit My Script W/o Leaving An Orphan Process Running

Dec 4, 2010

It's called TextRipper and it creates indexable and editable text files from any image. Feel free to copy TextRipper; it's licenced under GPL. My troubles are with cracking passworded pdf's. (As you can see, I meant any when I said any image.)

I can't find a way for the user to cancel the decryption process by exiting the script without pdfcrack orphaning. Line 349 works the rest of the time; the concerned process is line 228. I believe it's a piping/subshell problem. At least that's how I've been going at it in vain.

I've made portability a priority and that the comments still require updating.

Code:

If the result is one output file, TextRipper will open it for you in OpenOffice Writer.

Otherwise all txt output files (editable and indexable) will be in the original file's directory." 0 0

View 14 Replies View Related

Programming :: Check If A Process Is Running - Syntax Error Near Unexpected Token `else'

Feb 10, 2011

I have an ubuntu 10.10 server and want to run a script on it to check if a process is running. If it is not running, it will start the process and also write into a log file.

When running the script i get the following error message:

syntax error near unexpected token `else'

Here is my script.

View 7 Replies View Related

General :: Display Processes % Usage But Only Want The Process Name And % Used?

Sep 14, 2010

I have to monitor the %MEM that processes are using, so I use the ps and sort command like this ....

ps -aux | sort -nk4

So this will sort by column 4 so I can see the all the processes that are using the highest %MEM. What I really want is to be able to just display the process name and the %MEM next to it. how to do this?

View 2 Replies View Related

General :: Optimum Number Of Processes For Process?

Oct 24, 2009

Optimum number of processes for procesor In Linux based os are there a optimum number of process for a processor that gives 'maximum performance' for system(or process range depend on cpu speed,cache etc...)? By 'maximum performance' I mean better performance?

View 5 Replies View Related

General :: Setuid Process Cannot See Processes Owned By That User

Nov 2, 2010

I would like to give a non-root user (nicollet) the ability to detect and send a signal to processes started by Apache2 (those processes are FastCGI scripts and the signal tells them to empty their cache). The processes are owned by the web user (www-data), and I'm running on Debian unstable.

I can't find any way to have the nicollet user see those processes.

The processes are running and can see by both root and www-data:

root@linux-01:~# ps -Af | grep baryton
www-data 17649 17648 0 10:27 ? 00:00:00 baryton
www-data 28145 1 0 Nov01 ? 00:00:12 baryton --bot
root 18701 18700 0 10:46 pts/0 00:00:00 grep baryton
root@linux-01:~#

[Code]....

The most surprising is that the grep process is indeed run by www-data (because it's started from a setuid executable) and is visible, but the baryton process isn't.

What's going on here? Why can ps run by www-data show those processes, but ps run by a setuid executable running as www-data cannot, when it's started by nicollet?

View 1 Replies View Related

General :: How To Tell The Kill Command To Ignore Processes If That Process Is Not Alive

Jun 18, 2010

How to tell the kill command to ignore processes if that process is not alive?

For example: 3453 is an alive process but 44534 is not.

kill -9 3453 44534

View 4 Replies View Related

Ubuntu :: Send Process To Working Backgroud For CTRL+Z Processes?

May 18, 2010

I would like to set process in background in such a way that it will be running.For example, I started vim editor and pressed CTRL+Z command to put the process in background. But this process is in stopped status, which I can check with 'jobs' command.Is there any way that stopped job can be put into running background process?

View 1 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

Programming :: Get Process Running CPU Core And The Utilization On That Core?

Apr 27, 2010

Assume someone bind a particular process to a particular CPU core(In multi core machine) by using sched_setaffinity() like functions. Then how we can get that process running core id and CPU core utilisation of that process on that running CPU core(Pragmatically or by a Linux command)?.

View 5 Replies View Related

General :: How To Know What Processes Are Running

Jun 6, 2010

GNU/linux kernel 2.6, Slackware 12.0.Hi:How do I know what processes are running?

View 6 Replies View Related

Debian :: Running Same Process Multiple Times(from Another Account) / An Instance Of Newsbeuter Is Already Running Error?

Aug 6, 2010

Sometimes I connect to my Debian box from another computer (using SSH on Cygwin or Linux), and once ina while I want to run some console apps. And sometimes some of these apps might complain about "another intance, Error: an instance of newsbeuter is already running (PID: 2496)". Is there a work around for this issue at all(without killing the original instance") ? The reason I do not want to kill the app because there might be 2 users connected to the same machine that might be using the same app.

View 1 Replies View Related

General :: How To Count How Many Of Processes Are Running

Nov 3, 2010

I list all the instances of a running process my doing:ps -ef | grep myprogramThis lists all them.how can I simply output a count of how many are running?

View 2 Replies View Related

Debian :: Running Boot Processes In Parallel?

Apr 5, 2011

Does Debian 6 "Squeeze" automatically run boot processes in parallel if not how do I

configure it to do so. Here is the quote from my /etc/init.d/rc :
# Specify method used to enable concurrent init.d scripts.
# Valid options are 'none' and 'makefile'. Obsolete options

[code]...

View 2 Replies View Related

Ubuntu :: Ssh Banner With The Number Of Currently Running Processes?

May 18, 2010

I would like to do the following: Create a banner for any user logging in through ssh which warns him/her about the number of processors being used already by other users (or conversely the number of free processors). For example, if a user logged in he would then see a message like: Warning! 7 out of 8 processors are in use.I already figured out how to do a banner and with ps -e -o pcpu I can get all processes' %CPU usage. I think I would like to count the number of processes which have more than 90% CPU usage and output this number ("7" in the example) in the banner

View 7 Replies View Related

Ubuntu Security :: Do Not Know If There Are Scripts Running On The Processes Or Not?

May 7, 2011

To: The Cog >>>

Code:
The Cog, heres the reszults for ps -ef | grep tty:
yo mama@blah:~$ ps -ef | grep tty

[code]....

View 9 Replies View Related

Ubuntu :: Task Manager (To See Running Processes)

Feb 8, 2011

Ubuntu 10.10. I am curious if there is kind of task manager in ubuntu I can see running processes etc? Like windows task manager?

View 5 Replies View Related







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