0

in my exam, there was a question:
what is linux/command which can't be ignored in any way? write the command to kill a process having id 1234 ?

my answer was : SIGKILL and for second part i have written a C code function kill(1234,SIGKILL).

now my teacher is saying kill() is not a command rather it is function. SO answer is "kill -9 1234" according to him. So can anyone tell that is he wrong or i am wrong ? kill() is a function. thanks in advance.

2
Contributors
4
Replies
6
Views
5 Years
Discussion Span
Last Post by nitin1
0

So can anyone tell that is he wrong or i am wrong ?

You're wrong. The "command" is a Linux program that when run will send SIGKILL to the given process, which basically cannot be ignored. Your teacher clearly wanted you to use "commands" provided by the system, not write a function in C.

I'm curious though. How was your kill() function implemented?

Edited by deceptikon

0

no, no! i have just wrote this :

int kill(1234,SIGKILL);

like this. but he said you should write this:

kill -9 1234

so, now please throw light on it. thanks

Edited by nitin1

0

hm. finally, that's mean he is correct and that means 1 mark is deducted ? :(

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.