missing: define kernel internal limit TASK_COMM_LEN in userspace too

We already use it at two places, and we are about to add one too.
Arbitrary literally hardcoded limits suck.
This commit is contained in:
Lennart Poettering
2018-06-01 21:43:43 +02:00
parent e225e5c3c6
commit 92f14395cd
3 changed files with 9 additions and 2 deletions

View File

@@ -1407,4 +1407,11 @@ struct statx {
#define AT_STATX_DONT_SYNC 0x4000
#endif
/* The maximum thread/process name length including trailing NUL byte. This mimics the kernel definition of the same
* name, which we need in userspace at various places but is not defined in userspace currently, neither under this
* name nor any other. */
#ifndef TASK_COMM_LEN
#define TASK_COMM_LEN 16
#endif
#include "missing_syscall.h"