* Wording and formatting fixes to existing text and
Denys Vlasenko's new text.
* Various technical amendments and improvements to
Denys Vlasenko's new text.
* Added FIXME for various problems with the current text.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Changes include:
s/parent/tracer/g, s/child/tracee/g - ptrace interface now
is sufficiently cleaned up to not treat tracing process
as parent.
Deleted several outright false statements:
- pid 1 can be traced
- tracer is not shown as parent in ps output
- PTRACE_ATTACH is not "the same behavior as if tracee had done
a PTRACE_TRACEME": PTRACE_ATTACH delivers a SIGSTOP.
- SIGSTOP _can_ be injected.
- Removed mentions of SunOS and Solaris as irrelevant.
- Added a few more known bugs.
Added a large block of text in DESCRIPTION which doesn't focus
on mechanical description of each flag and operation, but rather
tries to describe a bigger picture. The targeted audience is
a person which is reasonably knowledgeable in Unix but did not
spend years working with ptrace, and thus may be unaware of its
quirks. This text went through several iterations of review by
Oleg Nesterov and Tejun Heo.
This block of text intentionally uses as little markup as possible,
otherwise future modifications to it will be very hard to make.
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
An edited version of Guillem Jover's comments:
[While the file descriptor does not need to be writable on Linux]
that's not a safe portable assumption to make on POSIX in general
as that behavior is not specified and as such is
implementation-specific. Some Unix systems do actually fail on
read-only file descriptors, for example [HP-UX and AIX].
Reported-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
- explain the situation with disk caches better
- remove the duplicate fdatasync() explanation in the NOTES
section
- remove an incorrect note about fsync() generally requiring two
writes
- remove an obsolete ext2 example note
- fsync() works on any file descriptor (doesn't need to be
writable); correct the EBADF error code explanation
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The addition of a second class of operation ("hole punching")
to the man page made it clear that some significant restructuring
is required. So I substantially reworked the page, including the
preexisting material on the default "file allocation" operation.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
FALLOC_FL_PUNCH_HOLE was added in Linux 2.6.38,
for punching holes in the allocated space in a file.
Signed-off-by: Lucian Adrian Grijincu <lucian.grijincu@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Some pieces inspired by an initial attempt by Stephan Mueller.
Reported-by: Stephan Mueller <stephan.mueller@atsec.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>