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!
This commit is contained in:
@@ -184,7 +184,7 @@ BUrlRequest::Status() const
|
|||||||
// #pragma mark Thread management
|
// #pragma mark Thread management
|
||||||
|
|
||||||
|
|
||||||
void
|
static void
|
||||||
empty(int)
|
empty(int)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -194,7 +194,9 @@ empty(int)
|
|||||||
BUrlRequest::_ThreadEntry(void* arg)
|
BUrlRequest::_ThreadEntry(void* arg)
|
||||||
{
|
{
|
||||||
// Setup an (empty) signal handler so we can be stopped by a signal,
|
// 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;
|
struct sigaction action;
|
||||||
action.sa_handler = empty;
|
action.sa_handler = empty;
|
||||||
action.sa_mask = 0;
|
action.sa_mask = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user