mirror of https://github.com/mkerrisk/man-pages
pidfd_open.2: Close the pidfd in EXAMPLE
Close the PID file descriptor in the example program, to hint to the reader that like every other kind of file descriptor, a PID FD should be closed. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
f4fb9919e1
commit
7cb61821b9
|
@ -256,6 +256,7 @@ main(int argc, char *argv[])
|
|||
printf("Events (0x%x): POLLIN is %sset\en", pollfd.revents,
|
||||
(pollfd.revents & POLLIN) ? "" : "not ");
|
||||
|
||||
close(pidfd);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
.fi
|
||||
|
|
Loading…
Reference in New Issue