diff options
author | pali <7141871+pali@users.noreply.github.com> | 2020-05-25 07:35:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-25 15:35:55 +1000 |
commit | c319558b8cacad7d27f04c7d612e44b67f273434 (patch) | |
tree | d84665ff78c0b84d604eadc256bb1eb10789da55 /pppd/utils.c | |
parent | 0bc11fba4e57d6fabfdce20bef07d4dd4d6ef38c (diff) | |
download | ppp-c319558b8cacad7d27f04c7d612e44b67f273434.tar.gz |
pppd: Handle SIGINT and SIGTERM during interrupted syscalls (#148)
When pppd receives SIGINT or SIGTERM it should handle it and not try to
restart interrupted syscall.
This change fixes problem that pppd cannot be terminated by SIGINT or
SIGTERM signal when pppd plugins are used.
Signed-off-by: Pali Rohár <pali@kernel.org>
Diffstat (limited to 'pppd/utils.c')
-rw-r--r-- | pppd/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pppd/utils.c b/pppd/utils.c index 3602aa6..23189d0 100644 --- a/pppd/utils.c +++ b/pppd/utils.c @@ -835,7 +835,7 @@ complete_read(int fd, void *buf, size_t count) for (done = 0; done < count; ) { nb = read(fd, ptr, count - done); if (nb < 0) { - if (errno == EINTR) + if (errno == EINTR && !got_sigterm) continue; return -1; } |