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


ADVERTISEMENT

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

Fedora :: Amahi Installer Got Stuck / Now Can't Get It To Relaunch

Feb 20, 2010

I was installing amahi last night using this method "http://wiki.amahi.org/index.php/Self-install-existing" since i can't do the usual install. I followed all 6 steps and was at the stage where the amahi web based installer was running. It got to 78%Setting up HTTP connection and got stuck there, i left it going all night and eventually decided to reboot and try again.Now i can't get the installer URL... to launch! it just says "unable to connect"in firefox.I just did all the six steps again but still nothing so im not sure what to do. I was going to try Add/Remove programs but for some reason my version of fedora doesn't seem to have it!!

View 2 Replies View Related

Programming :: Displaying Process Id In Shell Script But There Is No Such Process?

Nov 9, 2010

I have a shell script to identify whether the process is running or not. If the process is not running, then I execute another script file to run my application. Below is my script and saved this script as monitorprocess.sh Code: #!/bin/bash

result=$(ps -ef | grep -v grep | grep "applicationname.sh" | awk '{print $2}')
echo $result
if [ "$result" == "" ];

[code]...

View 4 Replies View Related

Programming :: Difference Between Init.rc Process And Normal Process?

Mar 31, 2011

Is there any difference in cpu usage for process in init.rc(runs automatic when boot is happened) and manually running process. Will these both have same priority by default...?

View 1 Replies View Related

Programming ::get The PID Of The Process Giving Kill Signal To A Process?

Nov 26, 2008

I tried googling but didn't get any answer for this.I have a process called "abc" and it is running with PID "123".I have a putty session opened with PID "999".I am giving kill -TERM 123 from putty session.My process "abc" before dying it should catch the PID of the terminal which provided TERM signal to it.Is there any way to find this out

View 2 Replies View Related

Programming :: Showing Process Id But There Is No Such Process?

Nov 9, 2010

I have a shell script to identify whether the process is running or not. If the process is not running, then I execute another script file to run my application. Below is my script and saved this script as monitorprocess.sh

Code:
#!/bin/bash
result=$(ps -ef | grep -v grep | grep "applicationname.sh" | awk '{print $2}')

[code]...

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

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

Programming :: Unix Programming - Single Process That Does Not Start Up Any Other Threads

Sep 28, 2010

i want a process that can operate as both a TCP echo server and a UDP echo server. The process can provide service to many clients at the same time, but involves a single process that does not start up any other threads.

View 3 Replies View Related

OpenSUSE Install :: Installer Terminates Prematurely - Error 15

Dec 23, 2010

I tried to install 11.3 today but no luck so far. I installed it 3 times from GNOME liveCD and once from a LiveUSB both didn't work. With the CD, it restarts before installing initrd, GRUB tells me :
error 15 : file not found.
I verified both the image I downloaded via md5 and the CD I made and they both are OK.

View 9 Replies View Related

Ubuntu Networking :: Kppp: Pppd Terminates On Signal 15?

Dec 14, 2010

I am using kppp in ubuntu10.10 to connect via my samsung c3010 mobile and Airtel connection. But when I dial through it, it terminates on signal 15! Some requests are rejected it seems. I am pasting the log:

Dec 14 20:08:02 pratik pppd[1883]: pppd 2.4.5 started by pratik, uid 1000
Dec 14 20:08:02 pratik pppd[1883]: using channel 5
Dec 14 20:08:02 pratik pppd[1883]: Using interface ppp0
Dec 14 20:08:02 pratik pppd[1883]: Connect: ppp0 <--> /dev/ttyACM0

[Code]....

I am connecting the modem over USB. The GUI shows me it is dialling the number, and then connecting to the network, and after a while ( it sends it 9 times it seems) it terminates.

View 9 Replies View Related

General :: Loop Terminates / Quits After Single Cycle

Jul 14, 2011

I tried to find an answer to whatever is happening with my sh, tried a few approaches, but none is working the way I planned... the loop quits with exit 0, runs once, if I comment out 'ffmpeg' line, it runs N times as it should - ffmpeg does not error out other than 0.

Code:
find . | grep .mp3 | while read filename do
newfilename=`echo "$filename" | tr ".mp3" ".ogg"`
ffmpeg -i "$filename" -acodec libvorbis -ac 2 -aq 4 -y "$newfilename"
echo inside #4debug
done
echo outside

This sh runs once, echoes "inside" 'n "outside" once, exits with '0'... unless ffmpeg commented out. I also tried to feed the loop with: done < /tmp/fname.list. BTW, this works well - but I am very interested in the >while read< loop giving up.

Code:
for i in *.mp3; do ffmpeg -i "$i" -acodec libvorbis -ac 2 -aq 4 -y "$(basename "$i" .mp3).ogg"; done

View 3 Replies View Related

General :: Internet Broadband Connection Terminates Abruptly

Sep 4, 2010

I use ubuntu 9.10 karmic koala as my desktop OS. My internet connection is creating problems these days, ever since I started downloading torrents for iso files. Whenever the downloads in transmission client is running, the internet gets disconnected abruptly, and even my other downloads in d4x stops. On using the plog command in the terminal, it shows the following:

Sep 5 03:32:57 gunjan pppd[3241]: LCP terminated by peer
Sep 5 03:32:57 gunjan pppd[3241]: Connect time 4.5 minutes.
Sep 5 03:32:57 gunjan pppd[3241]: Sent 2102494 bytes, received 31842568 bytes.
Sep 5 03:33:00 gunjan pppd[3241]: Connection terminated.
Sep 5 03:33:00 gunjan pppd[3241]: Modem hangup
Sep 5 03:34:05 gunjan pppd[3241]: Timeout waiting for PADO packets
Sep 5 03:34:05 gunjan pppd[3241]: Unable to complete PPPoE Discovery
Sep 5 03:35:10 gunjan pppd[3241]: Timeout waiting for PADO packets
Sep 5 03:35:10 gunjan pppd[3241]: Unable to complete PPPoE Discovery

I dont understand much of it, as am a new user using linux systems from only a few months ago, can't find out. Also on closing the transmission client the other downloads in d4x run perfectly well and so does my internet connection.

View 1 Replies View Related

Ubuntu Installation :: Booting Stops - Networking Terminates With Status 1

Apr 1, 2010

We are running Ubuntu on VMWare EXS Server 3i (32 bit server). We tried upgrading from Version 9.4 to 9.10. The server will not boot. It throws networking errors then just comes to a blank black screen.

Here is most of the screen:
/dev/sda5 was not cleanly unmounted, check forced. (note - this is due to having turned it off at the black screen - that much I get)
/dev/sdd1: recovering journal
/dev/sdb1: recovering journal
/dev/sdc1: recovering journal
/dev/sdb1: clean, 74772/6553600 files, 15793957/26214055 blocks (check in 5 mounts)
/dev/sdd1: clean, 22599/6553600 files, 15036060/26214055 blocks
/dev/sdc1: clean, 381500/13107200 files, 34291998/52428119 blocks
Filesystem checks are in progress (ESC to cancel):
***** here is where I think things are going bad ************
init: network-interface (eth0) pre-start process (535) terminated with status 1
init: network-interface (eth0) post-stop process(61 terminated with status 1
init: network-interface (lo) pre-start process (615) terminated with status 1
init: network-interface (lo) post-stop process(62 terminated with status 1
/dev/sda5: 105/124496 files (34.3% non-contiguous), 18894/.248976 blocks
mountall: fsck /boot [410] terminated with status 1
fsck from util-linux-ng 2.16
/dev/FileU32-root: clean, 69429/734400 files, 540860/2933760 blocks
init: networking main process (70 terminated with status 1

View 3 Replies View Related

Ubuntu :: Wally 2.4 - Command Line - As Soon As Close My Terminal - Terminates

Sep 24, 2010

I am using Ubuntu 10.04 and installed Wally 2.4.

I have few questions:

1) Currently I run wally with command line by running

Code:

It works, but as soon as I close my terminal, wally terminates. Is there anyway I can make it not terminate?

2) why is that option disabled?

View 4 Replies View Related

Ubuntu Security :: GKSU Terminates After 1 Incorrect Password Attempt

Nov 19, 2010

Just like the title says, if I were to try to run anything through gksu and accidentally put in an incorrect password, instead of the gksu window coming up again, it would just terminate.

Code:
theyain@theyain-laptop:~$ gksu update-manager
GNOME_SUDO_PASSGNOME_SUDO_PASSSorry, try again.
sudo: 3 incorrect password attempts

Whats interesting is that it gives me the sudo error after only one incorrect password attempt.

View 8 Replies View Related

General :: Pardus Upgrade Failed - PISI Terminates After Checking

Apr 11, 2010

I did an upgrade from pardus 2009 to 2009.1. When all the packages finished downloading and started installing, the power went off suddenly. Now my system is boots fine till the graphical login, but after I enter username and password, desktop fails to load and I am back at the login screen. I tried to resume the upgrade using (# pisi upgrade) but pisi terminates after checking the repositories. What to do?

View 2 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 :: How To Get Process ID Using Pidof

Jan 31, 2011

I tried to get process ID using pidof. It didn't give any error but a blank output at console Code: $ pidof -s instance1

$
But when I use ps -ef, I get the process ID Code: $ ps -ef | grep instance1
root 4174 21661 0 06:52 pts/1 00:00:00 grep instance1
provgw 30220 30219 28 06:46 pts/1 00:01:44 /usr/java/jdk1.6.0_18/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager

[Code].....

View 5 Replies View Related

Programming :: Force Two Process To Run On The Same CPU?

Jan 11, 2011

I'm programming a software system that consists of multiple processes. It is programmed in C++ under Linux. and they communicate among them using Linux shared memory.

Usually, in software development, is in the final stage when the performance optimization is made. Here I came to a big problem. The software has high performance requirements, but in machines with 4 or 8 CPU cores (usually with more than one CPU), it was only able to use 3 cores, thus wasting 25% of the CPU power in the first ones, and more than 60% in the second ones. After many, many research, and having discarded mutex and lock contention, I found out that the time was being wasted on shmdt/shmat calls (detach and attach to shared memory segments). After some more research, I found out that these CPUs, which usually are AMD Opteron and Intel Xeon, use a memory system called NUMA, which basically means that each processor has its fast, "local memory", and accessing memory from other CPUs is expensive.

After doing some tests, the problem seems to be that the software is designed so that, basically, any process can pass shared memory segments to any other process, and to any thread in them. This seems to kill performance, as process are constantly accessing memory from other processes.

Now, the question is, is there any way to force groups of process to execute in the same CPU?. I don't mean to force them to execute always in the same processor, as I don't care in which one they are executed, but that would do the job. Ideally, there would be a way to tell the kernel: If you schedule this process in one processor, you must also schedule this "brother" process (which is the process with which it communicates through shared memory) in that same processor, so that performance is not penalized.

View 1 Replies View Related

Programming :: Know Status Of Process With PID?

May 25, 2010

How can I programatically know the status of a process if its PID is known?

View 1 Replies View Related

Programming :: Using Copy_from_user With 2 Process?

Oct 20, 2010

Is there a way to send/receive messages between 2 process using copy_from_user and copy_to_user ? I'm looking for some article, but did not found anything.

View 1 Replies View Related

Programming :: Batch Process Files In VI?

May 29, 2010

I'm completely new to scripting and I'm trying to figure out how to write a script that will get a list of all the files in a directorywn through any subdirectories.When I have the list I want to o each file in VI and change the fileformat. So far all I have been able to figure out is that VI can do the batch processing and that "ls -R" gets me the recursive file list. I'm still pretty clueless on how to do the batch process with the VI editor. I think I'm supposed to use the Ex mode but I don't know how to get the list of arguments from the filelist into the editor so they can be processed. If it matters the files were all written in a Windows editor and have gotten the MS carriage returns so I want to do a :set ff=unix command on all the files without having to go into each file manually, there are over 300 files that need updated.

View 3 Replies View Related

Programming :: Getting The CPU & (Virtual) Memory Of A Process?

Aug 23, 2010

Is there any program which gets the CPU and memory of a process ?

View 1 Replies View Related

Programming :: Maximum Ports Per Process?

Dec 8, 2010

I'm trying to build a multi-threaded server "C" program connecting to multiple clients. For various design reasons, I thought of having one port number per client. What is the maximum number of ports my process can handle

View 5 Replies View Related

Programming :: Listing All Threads In A Process?

Dec 29, 2010

How to list all the threads spawned by a process?

View 4 Replies View Related

Programming :: Process Memory Allocation

Apr 30, 2011

I have been assigned a school project on detecting memory leaks in linux processes. I am reading.. but have found it hard and inefficient to go through the very vast documentation not knowing what to really look for. Could you please give me some guidelines on this subject?

View 4 Replies View Related







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