Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

explain_kill_or_die(3) [debian man page]

explain_kill_or_die(3)					     Library Functions Manual					    explain_kill_or_die(3)

NAME
explain_kill_or_die - send signal to a process and report errors SYNOPSIS
#include <libexplain/kill.h> void explain_kill_or_die(pid_t pid, int sig); int explain_kill_on_error(pid_t pid, int sig); DESCRIPTION
The explain_kill_or_die function is used to call the kill(2) system call. On failure an explanation will be printed to stderr, obtained from the explain_kill(3) function, and then the process terminates by calling exit(EXIT_FAILURE). The explain_kill_on_error function is used to call the kill(2) system call. On failure an explanation will be printed to stderr, obtained from the explain_kill(3) function, but still returns to the caller. pid The pid, exactly as to be passed to the kill(2) system call. sig The sig, exactly as to be passed to the kill(2) system call. RETURN VALUE
The explain_kill_or_die function only returns on success, see kill(2) for more information. On failure, prints an explanation and exits, it does not return. The explain_kill_on_error function always returns the value return by the wrapped kill(2) system call. EXAMPLE
The explain_kill_or_die function is intended to be used in a fashion similar to the following example: explain_kill_or_die(pid, sig); SEE ALSO
kill(2) send signal to a process explain_kill(3) explain kill(2) errors exit(2) terminate the calling process COPYRIGHT
libexplain version 0.52 Copyright (C) 2009 Peter Miller explain_kill_or_die(3)

Check Out this Related Man Page

explain_getpgrp_or_die(3)				     Library Functions Manual					 explain_getpgrp_or_die(3)

NAME
explain_getpgrp_or_die - get process group and report errors SYNOPSIS
#include <libexplain/getpgrp.h> pid_t explain_getpgrp_or_die(pid_t pid); pid_t explain_getpgrp_on_error(pid_t pid); DESCRIPTION
The explain_getpgrp_or_die function is used to call the getpgrp(2) system call. On failure an explanation will be printed to stderr, obtained from the explain_getpgrp(3) function, and then the process terminates by calling exit(EXIT_FAILURE). The explain_getpgrp_on_error function is used to call the getpgrp(2) system call. On failure an explanation will be printed to stderr, obtained from the explain_getpgrp(3) function, but still returns to the caller. pid The pid, exactly as to be passed to the getpgrp(2) system call. API Inconsistencies Note: the getpgrp(2) function has two implementations. The POSIX.1 version has no arguments, while the BSD version has one argument. For simplicity of implementation, the argument list seen here includes the pid argument. The POSIX.1 getpgid() semanatics can be obtained by calling getpgrp(0) on BSD systems, and this is the API for libexplain, even on systems that do not use the BSD API. RETURN VALUE
The explain_getpgrp_or_die function only returns on success, see getpgrp(2) for more information. On failure, prints an explanation and exits, it does not return. The explain_getpgrp_on_error function always returns the value return by the wrapped getpgrp(2) system call. EXAMPLE
The explain_getpgrp_or_die function is intended to be used in a fashion similar to the following example: pid_t result = explain_getpgrp_or_die(pid); SEE ALSO
getpgrp(2) get process group explain_getpgrp(3) explain getpgrp(2) errors exit(2) terminate the calling process COPYRIGHT
libexplain version 0.52 Copyright (C) 2011 Peter Miller explain_getpgrp_or_die(3)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to find a hanging pid

I am trying to write a simple shell script to find a hanging pid and kill it.Any idea how to find a hanging pid?? (6 Replies)
Discussion started by: Ravi Kanth
6 Replies

2. UNIX for Dummies Questions & Answers

display went awkwards after issue kill pid

hi, i kill a process which is topas. then i do a fg of the process itself and got this Signal 15 received.finally, the display went as belows.... root@myhost:/]ksh: ^L^L^Lps: not found. root@myhost:/] PID TTY TIME CMD ... (4 Replies)
Discussion started by: yls177
4 Replies

3. UNIX for Advanced & Expert Users

Interrupt signal Control C takes too long to terminate a process

I have a process to terminate, and when keying Control C/ kill -int , it takes 15 minutes to half an hour to terminate the process. I've tried using kill -2, or keying control c twice, however the process seem to be killed abruptly, without writing into the log file. So the only way in order to... (8 Replies)
Discussion started by: paqui
8 Replies

4. Programming

kill textrdit program

Dear All: I use sun OS system and write a code in c as folloing purpose kill textedit program,but i get some error please give me a great help Thanks. #include <stdlib.h> int main() { const char cTestPrag=" kill -9 `ps -ef | grep textedit | grep -v "grep"| awk '{print $2}'| xargs` "; ... (6 Replies)
Discussion started by: jeter
6 Replies

5. Solaris

process denied to kill

dear experts does any one know how to when i make any process make it available to any user to kill it (7 Replies)
Discussion started by: murad.jaber
7 Replies

6. Shell Programming and Scripting

kill process help

i wanted to kill a process by entering the process name. How am i able to kill the process that allows user to enter the process name and kills it? (5 Replies)
Discussion started by: thms_sum
5 Replies

7. UNIX for Dummies Questions & Answers

what happens when user does kill 1

what happens when user does kill 1 and kill 0 does the system shutdown (6 Replies)
Discussion started by: santosh149
6 Replies

8. Shell Programming and Scripting

When kill [pid] does not work...

Hi, On my Linux machine, using Bash, I sometimes run into a situation where doing the following does not seem to work at all. kermit@fastbox ~ $ ps -A | grep firefox-bin 5375 ? 00:06:57 firefox-bin <defunct> 5624 ? 00:00:00 firefox-bin kermit@fastbox ~ $ kill 5624... (7 Replies)
Discussion started by: kermit
7 Replies

9. Shell Programming and Scripting

What does kill $! do?

What does $! return? (13 Replies)
Discussion started by: dipashre
13 Replies

10. Programming

kill priority

hello everybody! i would like to post a question. If i embed in my C code the command kill(9,pid) inside an if command. Is this command(kill) executed in any way. Both if the if is true and false. Does kill have greater priority than the if command. thanx in advance! (5 Replies)
Discussion started by: nicos
5 Replies

11. AIX

How to kill exiting process in AIX

I could not able to kill two process which is running in the required port for me.Can any body help me to kill the exiting process. - 27000908 - - - <exiting> - 30998528 - - - <exiting> (8 Replies)
Discussion started by: sasikanta
8 Replies

12. Red Hat

7z crashes system

Can someone tell my why every time I try to use 7z it freezes my system? I can't move my mouse, I can't type, I can't kill my xsession. I then restart my system and everything returns to normal. When I try to use 7z my system again freezes. (11 Replies)
Discussion started by: cokedude
11 Replies

13. Shell Programming and Scripting

script to kill a pid giving error

Hi, I simply want to kill a running process using a script that read pid from a file and tries to kill it .Getting error as shown below code.. cat $HOME/BackupScript.ksh.run | head -1 | while read pid do ps -p $pid > /dev/null 2>&1 if ; then kill -9 $pid else echo "no running $pid... (5 Replies)
Discussion started by: dhirajdsharma
5 Replies

14. Shell Programming and Scripting

Find the Pid and Kill the Process after a Few Minutes

hi guys i had written a shell script Display Information of all the File Systems i want to find the pid and kill the process after few minutes.how can i obtain the pid and kill it??? sample.sh df -a >> /tmp/size.log and my cron to execute every minute every hour every day * *... (5 Replies)
Discussion started by: azherkn3
5 Replies

15. Shell Programming and Scripting

Cancel process running for more than 5 days

Hello Group, We want to create a script in order to filter process in the system with more than five days (STIME) and then kill them under Solaris 10. How can we filter these kind of process ? ps -efa Thanks in advance for your help (4 Replies)
Discussion started by: csierra
4 Replies