Skip to content

Commit

Permalink
pidfds: don't print a scary warning on ENOSYS
Browse files Browse the repository at this point in the history
Most kernels don't have this functionality yet, and so the warning is
printed a lot. Our people are scared of warnings, so let's make it INFO
instead in this case.

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
  • Loading branch information
tych0 committed Jul 23, 2019
1 parent 5c338ef commit 9c57920
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lxc/start.c
Expand Up @@ -1641,7 +1641,10 @@ static int proc_pidfd_open(pid_t pid)

/* Test whether we can send signals. */
if (lxc_raw_pidfd_send_signal(proc_pidfd, 0, NULL, 0)) {
SYSERROR("Failed to send signal through pidfd");
if (errno != ENOSYS)
SYSERROR("Failed to send signal through pidfd");
else
INFO("Sending signals through pidfds not supported on this kernel");
return -1;
}

Expand Down

0 comments on commit 9c57920

Please sign in to comment.