UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

#1 2007-08-23 09:32 AM

zhn636
Member
Registered: 2007-04-24
Posts: 146

Re: kill function

when we return from the kill function ,whether it can send a signal to the main process.
when we call the kill() ,where we can  pass the second signal number parmeter ? for example :when we in a process to call kill(getpid(),SIGABRT),whether it send the SIGABRT to our process.

Offline

#2 2007-08-23 01:32 PM

RobSeace
Administrator
From: Boston, MA
Registered: 2002-06-12
Posts: 3,847
Website

Re: kill function

Generally, if you want to send yourself a signal, you'd use raise() instead of kill()...
And, if you wanted to send yourself SIGABRT, you'd generally want to call abort()
instead of either...  However, yes technically you CAN do what you've shown, and
it'll work as expected...

Offline

#3 2007-08-23 05:12 PM

zhn636
Member
Registered: 2007-04-24
Posts: 146

Re: kill function

and can you tell me when we use kill() in our programming?whether we use it when we want to kill our process.

Offline

#4 2007-08-23 05:36 PM

HectorLasso
Administrator
From: Colombia
Registered: 2002-06-12
Posts: 353

Re: kill function

Offline

Board footer

Powered by FluxBB