Skip to content

Commit 1cbfadc

Browse files
committed
Improved language.
1 parent da5d042 commit 1cbfadc

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

proc.tex

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,20 +1097,17 @@
10971097
and does not work well with ASLR (Address Space Layout Randomization) which is
10981098
frequently used in current Unix systems for dynamically linked programs.
10991099
\item \textbf{warning:} w.r.t. \texttt{MAP\_SHARED} -- if the file is truncated
1100-
by another process so that the truncation affects the mapped part, the access
1101-
to such area results in the \texttt{SIGBUS} resp. \texttt{SIGSEGV} or signal
1102-
to be sent to the process. One way how to get around it is to use
1103-
mandatory locking, however it is not implemented in all the systems.
1104-
In case the mapped memory is used as a parameter for \texttt{write},
1105-
the signal will not be sent and \texttt{write} will return -1
1106-
with \texttt{errno} set to \texttt{EFAULT}.
1100+
by another process in such a way that the truncation affects the mapped part,
1101+
the access to such area results in getting \texttt{SIGBUS} or \texttt{SIGSEGV}.
1102+
One way how to get around it is to use mandatory locking, however it is not
1103+
implemented in all the systems. In case the mapped memory is used as a
1104+
parameter for \texttt{write}, the signal will not be sent and \texttt{write}
1105+
will return -1 with \texttt{errno} set to \texttt{EFAULT}.
11071106
\item when using \texttt{MAP\_PRIVATE} on Solaris all the changes done by other
11081107
processes that have mapped the file using \texttt{MAP\_SHARED} are visible
1109-
until the process writes to the page.
1110-
-- at this moment a copy of the page is created and subsequent changes by
1111-
other processes are not visible anymore.
1112-
On FreeBSD the changes are not visible even before the first write.
1113-
The spec says:
1108+
until the process writes to the page. At this moment a copy of the page is
1109+
created and subsequent changes by other processes are not visible anymore.
1110+
On FreeBSD such changes are never visible. The spec says:
11141111
\emph{,,It is unspecified whether modifications to the underlying object done
11151112
after the \texttt{MAP\_PRIVATE} mapping is established are visible through the
11161113
\texttt{MAP\_PRIVATE} mapping.''}

0 commit comments

Comments
 (0)