Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
how to send signal to a certain process, i know one way is though the keyboard, are there any other way such as writting a program that contains some sorta of send_sig function???
To get a list of signals which you can send to a program:
kill -l
I am a little confused about your question. Is it possible to write a program that has some send_sig function? Of course it is! Here's a python example:
Code:
#!/usr/bin/python
import os
def send_sig(signal, pid):
command = "kill -s"
command += signal
command += pid
os.system(command)
send_sig("SIGKILL", 2420)
yeah i read through those, but it's not what I wanted
I want to be able to send a user defined-signal to a group leader, which in term it will pass "my" signal down to all of its children. So far everything I read is about how to catch the signal, the only thing that tells me about sending is through keyboard, or kill(), raise(), <-- but these are not user-defined though.
How to send user defined signals in linux using C.
Hi ,
I am also looking answer for the same question.
How to send user defined signals in linux using C.
I believe you already got the answer for this, so can you please share the same.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.