diff --git a/man2/shmop.2 b/man2/shmop.2 index 9fa92dae8..d37f44f6c 100644 --- a/man2/shmop.2 +++ b/man2/shmop.2 @@ -175,12 +175,17 @@ all attached shared memory segments are detached from the process. .SH "RETURN VALUE" On success .BR shmat () -returns the address of the attached shared memory segment, and -.BR shmdt () -returns 0. -On failure both functions return \-1 with +returns the address of the attached shared memory segment; on error +.I (void *) \-1 +is returned, and .I errno -indicating the error. +is set to indicate the cause of the error. + +On success +.BR shmdt () +returns 0; on error \-1 is returned, and +.I errno +is set to indicate the cause of the error. .SH ERRORS When .BR shmat ()