.\"
.\" Kernel commit d97b46a64674a267bc41c9e16132ee2a98c3347d
.\"
-.TH KCMP 2 2013-01-27 "Linux" "Linux Programmer's Manual"
+.TH KCMP 2 2013-12-08 "Linux" "Linux Programmer's Manual"
.SH NAME
kcmp \- compare two processes to determine if they share a kernel resource
.SH SYNOPSIS
are ignored.
.TP
.BR KCMP_FS
-Check whether the processes share the same file system information
-(i.e., file mode creation mask, working directory, and file system root).
+Check whether the processes share the same filesystem information
+(i.e., file mode creation mask, working directory, and filesystem root).
The arguments
.I idx1
and
.TP
.BR KCMP_SYSVSEM
Check whether the processes share the same
-list of System V semaphore undo operations.
+list of System\ V semaphore undo operations.
The arguments
.I idx1
and
.PP
Note the
.BR kcmp ()
-is not protected against false positives which may have place if tasks are
+is not protected against false positives which may occur if tasks are
running.
-Which means one should stop tasks being inspected with this syscall to obtain
-meaningful results.
+One should stop tasks by sending
+.BR SIGSTOP
+(see
+.BR signal (7))
+prior to inspection with this system call to obtain meaningful results.
.SH RETURN VALUE
The return value of a successful call to
.BR kcmp ()
.I errno
is set appropriately.
-.B kcmp ()
+.BR kcmp ()
was designed to return values suitable for sorting.
This is particularly handy if one needs to compare
a large number of file descriptors.
system call first appeared in Linux 3.5.
.SH CONFORMING TO
.BR kcmp ()
-is Linux specific and should not be used in programs intended to be portable.
+is Linux-specific and should not be used in programs intended to be portable.
.SH NOTES
Glibc does not provide a wrapper for this system call; call it using
.BR syscall (2).
The alternative to this system call would have been to expose suitable
process information via the
.BR proc (5)
-file system; this was deemed to be unsuitable for security reasons.
+filesystem; this was deemed to be unsuitable for security reasons.
See
.BR clone (2)
.SH SEE ALSO
.BR clone (2),
.BR unshare (2)
+.SH COLOPHON
+This page is part of release 3.67 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.