mirror of https://github.com/mkerrisk/man-pages
prctl.2: Correct description of null-termination in PR_GET_NAME and PR_SET_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. Signed-off-by: Andreas Schwab <schwab@suse.de> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
891121f60e
commit
db6d60b30a
|
@ -240,7 +240,7 @@ using the value in the location pointed to by
|
||||||
.IR "(char\ *) arg2" .
|
.IR "(char\ *) arg2" .
|
||||||
The name can be up to 16 bytes long,
|
The name can be up to 16 bytes long,
|
||||||
.\" TASK_COMM_LEN in include/linux/sched.h
|
.\" 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
|
This is the same attribute that can be set via
|
||||||
.BR pthread_setname_np (3)
|
.BR pthread_setname_np (3)
|
||||||
and retrieved using
|
and retrieved using
|
||||||
|
@ -256,7 +256,7 @@ Return the name of the calling thread,
|
||||||
in the buffer pointed to by
|
in the buffer pointed to by
|
||||||
.IR "(char\ *) arg2" .
|
.IR "(char\ *) arg2" .
|
||||||
The buffer should allow space for up to 16 bytes;
|
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
|
.TP
|
||||||
.BR PR_SET_NO_NEW_PRIVS " (since Linux 3.5)"
|
.BR PR_SET_NO_NEW_PRIVS " (since Linux 3.5)"
|
||||||
Set the calling process's
|
Set the calling process's
|
||||||
|
|
Loading…
Reference in New Issue