Software :: Process Cannot Catch The HUP Signal?

Feb 3, 2010

i write one program,which can dynamiclly be configure by user,using signal SIGHUP.if i start the program in console,it can works well.i.e,i send HUP signal to the process,it can be catched and load the configure file.but,if the program is started from init shell script,in this way,the ppid of the program is 1,the process can not catch the HUP signal but other signal ,such as USR1,can be catched.i don't know if i express clearly.i am not family with shell script.i don't know if it dues to starting from shell script

View 1 Replies


ADVERTISEMENT

Programming :: [C++] Cannot Catch SIGPIPE Signal?

Mar 27, 2011

I have a Socket library, written in C++, in which the method used to send data never has the opportunity to handle an errno of SIGPIPE. Thus I thought perhaps I should setup a signal handler to receive the signal, but this too is not being called.Is there something that I am missing or doing that is completely wrong? Below is the relevant code. Note that a SIGPIPE signal is generated when the Server is unable to send data to the Client (e.g. the client has terminated).Server code:

Code:
#include <TCPServerSocket.hpp>
#include <string>

[code]...

View 1 Replies View Related

Programming :: Unable To Catch The SIGTERM Signal?

Apr 25, 2011

But unable to catch the SIGTERM signal if I do shutdown, as man pages says shutdown genrates the SIGTERM and SIGKILL signals, but we cant handle the SIGKILL signal. My code is working fine if I genrate the SIGTERM signal by Kill command, and also for SIGINT signgal genrated from the CTRL+c key.

Here is my code:

/* Example of using sigaction() to setup a signal handler with 3 arguments
* including siginfo_t.
*/
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
#include <string.h>

[Code]...

View 5 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 ::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

Ubuntu :: Plymouth Main Process Killed By SEGV Signal?

Apr 20, 2011

I just installed Ubuntu on a Cr-48 netbook, which has an odd custom bios which can't boot regular bootloaders/kernelsI'm therefore using the existing kernel on the machine rather than the Ubuntu one, with no initrd/initramfs, just booting directly to the Ubuntu root filesystem.t's just a minimal text mode install right now, from the alternate installerAt boot time, plymouth crashes. It doesn't seem to actually affect the system, everything still boots just fine, but it doesn't seem like it should be doing that I get:

Code:
mountall: Disconnected from Plymouth
init: plymouth main process (70) killed by SEGV signal

[code]....

View 1 Replies View Related

OpenSUSE :: Zypper Won't Die / Dump Process Out Of Memory Without Requiring It To Respond To Signal?

Feb 4, 2010

This is opensuse 11.2.

Somehow zypper is running at 100% cpu and won't die with command line kill, the system monitor kill, terminate or anything. I set it's priority to the lowest it will go, tried to stop it then kill it, nothing works as it simply is not responding to anything and it has been running now for 47 hours.

Is there a way to simply dump a process out of memory without requiring it to respond to a signal? because signals are doing nothing.

View 6 Replies View Related

Ubuntu :: Unable To Boot: Init: Plymouth Main Process (57) Killed By SEGV Signal

May 2, 2011

I upgraded from Ubuntu 10.0.4 to 11.0.4 on a Dell Optiplex. Now, when I boot, I am given the option to boot into different kernels. I select "ubuntu, with Linux 2.6.38-8-generic", which results in a black screen that reads

Code:

init: plymouth main process (58) killed by SEGV signal and that's where it hangs. Pressing ENTER or hitting Esc does nothing. What steps can I take to recover my machine and all the files I used to have on it?

View 2 Replies View Related

Fedora :: Nautilus-2.32.0-1.fc14 Reason: Process/usr/bin/nautilus Was Killed By Signal 11 (SIGSEGV)

Apr 28, 2011

I was transferring data from one computer to my laptop and crash error came up on my laptop...

Error 1:

Nautilus-2.32.0-1.fc14 Reason: Process/usr/bin/nautilus was killed by signal 11 (SIGSEGV)

Error 2:

Openoffice.Org-Brand Crash

Reason: Process/usr/lib/openoffice.org3/program/soffice.bin was killed by signal (SIGABRT)

What could be the problem? Is it serious issue? I have been having security issues with Windows and are those issues begun once again? I have been under targeted attack since 2005.

View 2 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 :: Catch Up A String In A Line?

Jun 17, 2010

I would like to make a shell script that will do the following :- have a web-page using curl- download a picture from the web-page- have a line in the source code of the web page
- catch a string (a link patch) from the line- go to another page of the website from the result of the previous step- repeat all this until there is no match for step 3I know how to :- have the web-page source code using curl (simple, we just have to make "curl- download the picture (as simple as the first step)- have a line in the source code (grep is made for that, isn't it ?)- go to another website from the result of the previous step (it's the same as the first step)But I really don't know how I can do the fourth step of my script.

In facts, I don't know regular expressions and even the shell command that can help me to do this.To be more clear, I would like to store in a variable the string represented by the star (*) in this : <a href="*">Next ></a>

View 12 Replies View Related

Programming :: How Sed Can Catch Variable From Input?

Feb 2, 2011

right now i am writing bash script for simple everyday todo tasks.script consisit of two files, fisrt is just script (which can delete/append /clear) and second one is todolist.txt which stores my notes.I am litlebit confused about sed!!for example, If my todolist.txt have these lines:

- Writing my Homework
- take my girlfriend to launch
- Take a break

How can sed take my input $@ and delete all line with name "Homework"..i trayed with many sed combination like:

Code:
sed s/$@//g
sed 'd/$@/'
and many more combination with ""/'' or bracket but nothing helped

View 5 Replies View Related

Ubuntu :: How To Catch / Supress Errors From Psql

Jun 23, 2010

How can I catch/supress errors from psql? I've got a simple program that will query psql, if a table is there it returns a 1 else returns a 0. The problem is I get the error message as well. How can I trap the error and just get the 1 or 0 to return?

View 1 Replies View Related

Programming :: Catch Some Outputs In Two Different Log Files In Bash?

Jan 26, 2009

I want to catch some outputs in two different log files in bash, file simple.log and all.log So far, the script is started like this:

Code:

xterm -e "(./myscript.sh | tee -a simple.log) >& all.log"

What I want is:

- In simple.log, I want all the stdout but WITHOUT errors.

- In all.log I want BOTH stdout and stderr.

So all is ok, and the output becomes:

all.log

Code:

starting copying files
mv: cannot move ... : permission denied
copying completed
simple log

Code:

starting copying files
copying completed

But, in the new xterm, I'm loosing stdout. There is no output.How can I have the files logged as they are but also have the stdout in the xterm.

View 6 Replies View Related

Programming :: Catch System-level Exceptions?

Jan 24, 2011

The following C++ program doesn't catch the exception:

Code:
#include <iostream>
using namespace std;

[code]...

View 2 Replies View Related

Slackware :: Get To The Point And Catch Up With Security Firefox

May 10, 2011

I start playing with Slackware and I am amazed about its endless possibilities. There is a security advisory for Firefox and 4.0.1 must be installed. Do I need to compile my own FF 4.0.1 build? Or, instead of inventing the wheel, could Slackware's Firefox 4.0.1 package be pulled from somewhere? if my question sounds naive, just trying to get to the point and catch up with security issues.

View 14 Replies View Related

Fedora :: Catch Updates In Order To Install Them Later Offline?

Jan 24, 2011

I have 2 PCs, one of them is updated with latest updates.
For sure the 2 PCs have the same OS Fedora 14. How to install or catch those updates in order for me to install them offline on the other PC ?

View 2 Replies View Related

Fedora :: Vim Settings Screen Not Allowing Enough Time To Catch It

Jul 13, 2011

Whether it is vi or gvim, you can view the current non-default settings by writing ":set" and pressing <ENTER>. However, in FC15, vim clears the settings screen really quickly, not allowing me enough time to catch it. Normally it should pause at the settings screen, and clear it only when I press any key. If others see the same problem, I will file a bug.

View 6 Replies View Related

OpenSUSE :: How To Make 11.3 Catch Partially Downloaded Packages

Jul 18, 2010

I have a flaky internet connection. So it's important for me to be able to resume partially downloaded files. I would like the YAST software manager to resume downloads of packages where I left off in case of any error. Is this possible?

View 5 Replies View Related

General :: Bash - Catch Or Stop A Shut Down From The Terminal?

Sep 12, 2011

Is there a way to catch or stop a Linux shut down after a reboot, halt or shutdown command has been entered?sudo shutdown -r +10 I should now have 10 minutes before the computer shuts down. If I change my mind and decide that I still want to continue running, how could I stop the shut down?

View 1 Replies View Related

Ubuntu Multimedia :: Make VLC And Mplayer Not Freeze And Catch Up Later?

Mar 3, 2010

I can't seem to find a multimedia player that works well for me. With VLC, the screen with freeze up and then update itself later to the correct time but it changes to lots of strange colors. With Mplayer, the video will freeze and then catch up later, like VLC does. With Totem, I can't seem to get the subtitles to work correctly. It replaces the subtitles with a font of it's own. I always used Media Player Classic on Windows and it worked really well. When I say "freeze up and catch up later" I mean that the video and subtitles will freeze, but the sound will keep going. The video and subtitles correct themselves a few seconds later.

1. Is there a way to make it so VLC doesn't freeze up and catch up later with strange colors?

2. A way to make VLC and Mplayer not freeze and catch up later?

3. Get Totem to display the correct subtitle font?

View 9 Replies View Related

Ubuntu Servers :: Postfix Config To Catch ALL Emails?

Jul 20, 2010

We have a number of servers at work, some production and some non-production. We run some java applications on these servers. At present these java applications send emails via an SMTP connection to our live email servers.

In production all is well, the java apps send emails to customers. However, in the non-production environments all emails must not be sent out. Instead they must end up in some kind of generic inbox.

We don't want to mess with the production setup at all and it isn't an option to lose the non-prod emails altogether. So on non-prod we can reference another SMTP server and send all emails there. So far I've set up a postfix, dovecot, squirrelmail email server which appears to work.

how do I config my new email server so that any emails sent from our non-prod server to fred@hotmail.com, bill@yahoo.com, jenny@gmail.com etc all end up in one inbox?

View 5 Replies View Related

General :: Catch All Data Being Written To Hard Drives?

Jul 18, 2010

I have a Linux CentOS server.Is there a way to store all changes made to the hard drive by all software on the server ?

View 14 Replies View Related

General :: How To Write Perl Script To Catch All Content

Aug 5, 2010

I would like to know a how to write Perl script to catch all the content in between BEGIN: and END from input file could any body help?

View 9 Replies View Related

Fedora :: Plasma Dock Doesn't Catch Clicks With Compiz?

Nov 9, 2010

I just decided to go with Compiz rather than Kwin for my window manager. I have everything working beautifully aside from one little problem... The plasma dock won't pick up clicks any more. The mouse focuses on whatever is underneath the dock, rather than the dock itself. I'm sure there is a setting I can alter to override this behavior, I just can't figure it out to save my life.

Upon further investigation I found that it only behaves this way if I set the dock to auto-hide.

View 1 Replies View Related

Ubuntu Networking :: Catch 22 Setting Up Dial-up Without The Proper Apps?

Nov 2, 2010

I'm sure this has been covered before but how does one go about setting up a dial-up Internet connection without wvdial or gnome ppp?

My brother lives in a remote area with only dial-up Internet service. I got him set up with an external serial modem plus a disc with Ubuntu 9.04 and WUBI. Apparently wvdial is not included in the basic install. I will be visiting him in a few days and I would like get him going with his dial up. He currently has Windows XP and WUBI installed. I tried sending him a disc with wvdial but it didn't include the dependencies. Is there any way I can download a package on a disc?

View 2 Replies View Related

Programming :: Catch User Input While The Bash Script Is Running?

Oct 30, 2010

How do you catch user input while the script is running? Or, how would you make two scripts run at the same time, but use input from one script to the other? The program I'm trying to make, echos text on the screen continuously, but while thats happening, I want the user to be able to input something, so the program can detect the input and display something else. So I thought maybe I could make two scripts run to do each task.

View 5 Replies View Related

Installation :: Didn't Catch Error Message Until Had Clicked Restart Button

Jun 8, 2010

I have been running Ubuntu with no problems for a while now. Earlier today, I began to download some updates. When I came back to the computer, there was a prompt to restart, but also an error message. I didn't catch the error message until I had clicked the restart button. Now, when I try to access Ubuntu from the dual-boot menu (I run Vista as well), I keep getting the following error message.

[3.190034] Kernel panic - not syncing: VFS: Unable to mount root fs on unkown-block (8,2).I tried safe mode, and I got the same error message. Vista runs normally.

View 2 Replies View Related

Programming :: Bash Script: Catch File Not Found Error And Send To /dev/null

Apr 21, 2010

I have the following working script. It checks the directory for txt files, if files are there, it copies to another directory or gives error. I would like to exclude "file not found" errors and send them to /dev/null. All other errors should go to the email address as usual.

Code:

#!/bin/bash
function err
{
if [[ $? -ne 0 ]]

[Code]....

View 7 Replies View Related

Red Hat / Fedora :: Command To Stop That File/process Or Is It Just Kill The Process To Stop The Process?

Nov 11, 2010

I've some file with .sh extensions that runs some softwares.Now,how do I stop running that filesI know we run the command ./start_tomcat.sh to start the apache.Is there any command to stop that file/process or is it just kill the process to stop the process

View 2 Replies View Related







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