What signal 0 does in kill command?

Solution Verified - Updated -

Issue

  • What signal 0 does in kill command?
  • when I execute "kill -0 PID" and PID is the id of a thread, the command exit without errors.
[root@host ~]# ps -eo pid,comm|grep -c 10252
0

[root@host ~]# kill -0 10252;echo $?
0

[root@host ~]# cat /proc/18020/task/10252/stat
10252 (imsd) S 1 18020 18020 0 -1 4202560 4 0 0 0 2 1 0 0 19 -1 1351 0 987845280 615174144 118443 18446744073709551615 134512640 139793320 4286914320 3934351508 4151395376 0 16391 4096 16391 18446744071580550505 0 0 -1 8 0 0 3 0 0
  • Is that the correct behavior of kill -0 command ?

Environment

  • Red Hat Enterprise Linux 6.4
  • util-linux

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content