From 92a78c8e15e523fea94b80b8f9c5757eb2d2ff6a Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Fri, 19 Jan 2007 15:19:52 +0000 Subject: [PATCH] Added SIGKILL handler --- src/net/udp/dns.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/net/udp/dns.c b/src/net/udp/dns.c index a5b658c2..ee6a58b5 100644 --- a/src/net/udp/dns.c +++ b/src/net/udp/dns.c @@ -397,9 +397,24 @@ static void dns_reap ( struct async *async ) { free ( dns ); } +/** + * Handle SIGKILL + * + * @v async Asynchronous operation + */ +static void dns_sigkill ( struct async *async, enum signal signal __unused ) { + struct dns_request *dns = + container_of ( async, struct dns_request, async ); + + dns_done ( dns, -ECANCELED ); +} + /** DNS asynchronous operations */ static struct async_operations dns_async_operations = { .reap = dns_reap, + .signal = { + [SIGKILL] = dns_sigkill, + }, }; /**