about summary refs log tree commit diff
path: root/extrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'extrace.c')
-rw-r--r--extrace.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/extrace.c b/extrace.c
index 2e457f9..99c4aeb 100644
--- a/extrace.c
+++ b/extrace.c
@@ -393,6 +393,10 @@ handle_msg(struct cn_msg *cn_hdr)
 			r3 = readlinkat(proc_dir_fd, "cwd", cwd, sizeof cwd);
 			if (r3 > 0)
 				cwd[r3] = 0;
+			else if (errno == EACCES)
+				strcpy(cwd, "EACCES");
+			else
+				strcpy(cwd, "EUNKNOWN");
 		}
 
 		if (!flat)