From afdca74d9b47e1c238bab42f0fe9fcfa1b982e0e Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Thu, 23 Jan 2014 17:23:29 +0100 Subject: [PATCH] Make signal handler static We don't want this method to be exposed in the global namespace! Also add a note about removing this signal-based solution when our close() method can be interrupted in other ways. thanks axel for watching! --- src/kits/network/libnetapi/UrlRequest.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/kits/network/libnetapi/UrlRequest.cpp b/src/kits/network/libnetapi/UrlRequest.cpp index 32da63513d..7e467793ef 100644 --- a/src/kits/network/libnetapi/UrlRequest.cpp +++ b/src/kits/network/libnetapi/UrlRequest.cpp @@ -184,7 +184,7 @@ BUrlRequest::Status() const // #pragma mark Thread management -void +static void empty(int) { } @@ -194,7 +194,9 @@ empty(int) BUrlRequest::_ThreadEntry(void* arg) { // Setup an (empty) signal handler so we can be stopped by a signal, - // witohut the whole process being killed. + // without the whole process being killed. + // TODO make connect() properly unlock when close() is called on the + // socket, and remove this. struct sigaction action; action.sa_handler = empty; action.sa_mask = 0;