Declare for Kill on MacOS

Does anyone have a declare statement for the Unix Kill call. I can find the definition the function but I can’t find out what library it’s located in. Any pointers would be welcome.

What does it do?
Is it the same thing as executing “kill PID” in Terminal?

If so, call kill from a Shell?

I have 10 or so shells that I want to kill off and I would rather a programmatic way than starting yet another shell. If it comes to it then I will use that, thanks.

aah ok :slight_smile:

Sorry. Just to be clear. I want to use Kill to kill the apps running in the Shells not use it to kill of the shell process it’s self. :slight_smile:

Use shell to ps aux and parse the result to get the process id of the apps you want to kill, and shell

kill 12345. No need for a declare.

Thanks Michel. As I said I would love to do this without the expense of another shell. I’ve already got the PID.

search for a function to send signals. Kill is one of the signals.

Yes, there is a kill function and a signal function, however, I can’t find which library it is located in. All the documentation is for C and doesn’t explain how it’s compiled into a library.

Pick the name of the function, then go to and search for it. The name of the library will be there.

And when you find it, that would be nice to simply post a reference for others to find that information when they search the forum.