Skip to contentSkip to conversation

prctl.2: Correct description of null-termination in PR_[GS]ET_NAME

PATCH New Andreas Schwab 1 participant 1 message Oct 14, 2014 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 prctl.2: Correct description of null-termination in PR_[GS]ET_NAME

The size of the process name has always been at most 16 byte _including_ the null terminator. This also means that the name returned by PR_GET_NAME is always null-terminated.

---
 man2/prctl.2 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
man2/prctl.2 +2 -2
index 1199891..4351ff9 100644
@@ -240,7 +240,7 @@ using the value in the location pointed to by
 .IR "(char\ *) arg2" .
 The name can be up to 16 bytes long,
 .\" TASK_COMM_LEN in include/linux/sched.h
-and should be null-terminated if it contains fewer bytes.
+including the terminating null byte.
 This is the same attribute that can be set via
 .BR pthread_setname_np (3)
 and retrieved using
@@ -256,7 +256,7 @@ Return the name of the calling thread,
 in the buffer pointed to by
 .IR "(char\ *) arg2" .
 The buffer should allow space for up to 16 bytes;
-the returned string will be null-terminated if it is shorter than that.
+the returned string will be null-terminated.
 .TP
 .BR PR_SET_NO_NEW_PRIVS " (since Linux 3.5)"
 Set the calling process's
Signature · 11 lines
2.1.2


-- 
Andreas Schwab, SUSE Labs, [email protected]
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html