summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/process-util.c4
-rw-r--r--src/basic/util.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/basic/process-util.c b/src/basic/process-util.c
index 61f188467f..cff2d2a034 100644
--- a/src/basic/process-util.c
+++ b/src/basic/process-util.c
@@ -181,10 +181,10 @@ int is_kernel_thread(pid_t pid) {
bool eof;
FILE *f;
- if (pid == 0)
+ if (pid == 0 || pid == 1) /* pid 1, and we ourselves certainly aren't a kernel thread */
return 0;
- assert(pid > 0);
+ assert(pid > 1);
p = procfs_file_alloca(pid, "cmdline");
f = fopen(p, "re");
diff --git a/src/basic/util.c b/src/basic/util.c
index a9071aa117..737f2a221c 100644
--- a/src/basic/util.c
+++ b/src/basic/util.c
@@ -4273,7 +4273,7 @@ bool is_locale_utf8(void) {
/* Check result, but ignore the result if C was set
* explicitly. */
cached_answer =
- streq(set, "C") &&
+ STR_IN_SET(set, "C", "POSIX") &&
!getenv("LC_ALL") &&
!getenv("LC_CTYPE") &&
!getenv("LANG");