473,408 Members | 2,427 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

How to get the pid of a process that send a signal to my program

Hi!

well, i have written a signal handler on my code, but i want to know
the pid of the process that send the signal. It's possible?

(I'm working on linux)

Thanks you.
Jun 27 '08 #1
7 1990
On Jun 11, 1:34 pm, "hugo.arre...@gmail.com" <hugo.arre...@gmail.com>
wrote:
>
well, i have written a signal handler on my code, but i want to know
the pid of the process that send the signal. It's possible?
RTFM:
man sigaction
Jun 27 '08 #2
ok, thanks you viza
On Jun 11, 9:48 am, viza <tom.v...@gmail.comwrote:
>
RTFM:
man sigaction
Jun 27 '08 #3
"hu**********@gmail.com" <hu**********@gmail.comwrites:
well, i have written a signal handler on my code, but i want to know
the pid of the process that send the signal. It's possible?

(I'm working on linux)
Ask in comp.unix.programmer.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Jun 27 '08 #4
Thanks you Keith, but Veza answer my question, i didn't read sigaction
parameters.

My fault xD.

Keith Thompson (The_Other_Keith) ks...@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Jun 27 '08 #5
"hu**********@gmail.com" wrote:
>
Thanks you Keith, but Veza answer my question, i didn't read
sigaction parameters.
You still don't know if the answer is correct, and even if it was
Veza had no business answering it here, where it is off topic.

Please do not top-post. Your answer belongs after (or intermixed
with) the quoted material to which you reply, after snipping all
irrelevant material. See the following links:

<http://www.catb.org/~esr/faqs/smart-questions.html>
<http://www.caliburn.nl/topposting.html>
<http://www.netmeister.org/news/learn2quote.html>
<http://cfaj.freeshell.org/google/ (taming google)
<http://members.fortunecity.com/nnqweb/ (newusers)

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
** Posted from http://www.teranews.com **
Jun 27 '08 #6
On 12 Jun 2008 at 0:15, CBFalconer wrote:
"hu**********@gmail.com" wrote:
>>
Thanks you Keith, but Veza answer my question, i didn't read
sigaction parameters.

You still don't know if the answer is correct, and even if it was
Veza had no business answering it here, where it is off topic.
If you're still reading, please note that Thomson and Falconer have a
very narrow view of topicality, not shared by many other posters. Don't
let them bully you into not asking questions here in future.

Jun 27 '08 #7
In article <sl*******************@nospam.invalid>,
Antoninus Twink <no****@nospam.invalidwrote:
>On 12 Jun 2008 at 0:15, CBFalconer wrote:
>"hu**********@gmail.com" wrote:
>>>
Thanks you Keith, but Veza answer my question, i didn't read
sigaction parameters.

You still don't know if the answer is correct, and even if it was
Veza had no business answering it here, where it is off topic.

If you're still reading, please note that Thomson and Falconer have a
very narrow view of topicality, not shared by many other posters. Don't
let them bully you into not asking questions here in future.
They are such old women - it is absolutely scary.

Just examine CBF's text above. Can't you just see some old biddy
with absolutely no life, worrying about other people's behavior?

Jun 27 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Marc | last post by:
Hi all, In searching for an answer to this problem I found several solutions dealing with Unix but none dealing with Windows. Basically I want to send a ping for an indefinite period of time,...
1
by: Peter Åstrand | last post by:
There's a new PEP available: PEP 324: popen5 - New POSIX process module A copy is included below. Comments are appreciated. ---- PEP: 324 Title: popen5 - New POSIX process module
18
by: jas | last post by:
Hi, I would like to start a new process and be able to read/write from/to it. I have tried things like... import subprocess as sp p = sp.Popen("cmd.exe", stdout=sp.PIPE)...
1
by: Alexander N. Spitzer | last post by:
I am trying to write a program that will fork a process, and execute the given task... the catch is that if it runs too long, I want to clean it up. this seemed pretty straight forward with a...
3
by: felixfix | last post by:
Hi all, I am just wondering if something is wrong with my program. What it bascially does is to output a fibonacci sequence base on the command-line output. If I give a 5, it will generate the...
3
by: s99999999s2003 | last post by:
hi i have a program that works very similar to tail -f in Unix It will need a Ctrl-C in order to break out of the program. I wish to run this program using python (either thru os.system() or some...
2
by: mumebuhi | last post by:
I am having problem to kill the following script completely. The script basically does the following. The main thread creates a new thread, which does a completely useless thing, and then starts...
7
by: soccertl | last post by:
We have a program running on AIX and uses DB/2. Every once in a while, while our program is just running along, DB/2 dies due to a signal 9 being sent to one of the EDU processes: ...
2
by: rahul | last post by:
Hello all I have written a chat server. It is invoked as follows - $ ./server -start It becomes a daemon. I want to implement a stop call- $ ./server -stop The approach I am following is to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.