Skip to content

Commit

Permalink
Use SIGUSR2 not SIGINT for flush
Browse files Browse the repository at this point in the history
  • Loading branch information
garlick committed Jun 9, 2011
1 parent 011d77c commit 725f7da
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions diod/diod.c
Expand Up @@ -359,7 +359,7 @@ _sighand (int sig)
case SIGUSR1:
ss.shutdown = 1;
break;
case SIGINT:
case SIGUSR2:
break;
default:
msg ("caught signal %d: ignoring", sig);
Expand Down Expand Up @@ -408,7 +408,7 @@ _service_loop (void *arg)

/* Set up signal handlers for SIGHUP and SIGTERM and block them.
* Threads will inherit this signal mask; _service_loop () will unblock.
* Install handler for SIGINT and don't block - this signal is used to
* Install handler for SIGUSR2 and don't block - this signal is used to
* interrupt I/O operations when handling a 9p flush.
*/
static void
Expand All @@ -426,7 +426,7 @@ _service_sigsetup (void)
err_exit ("sigaction");
if (sigaction (SIGUSR1, &sa, NULL) < 0)
err_exit ("sigaction");
if (sigaction (SIGINT, &sa, NULL) < 0)
if (sigaction (SIGUSR2, &sa, NULL) < 0)
err_exit ("sigaction");

sigemptyset (&sigs);
Expand Down
2 changes: 1 addition & 1 deletion libnpfs/conn.c
Expand Up @@ -253,7 +253,7 @@ np_conn_flush (Npconn *conn)
continue;
creq->flushed = 1;
if (conn->srv->flags & SRV_FLAGS_FLUSHSIG)
pthread_kill (creq->wthread->thread, SIGINT);
pthread_kill (creq->wthread->thread, SIGUSR2);
}
}
xpthread_mutex_unlock(&conn->srv->lock);
Expand Down
2 changes: 1 addition & 1 deletion libnpfs/fcall.c
Expand Up @@ -263,7 +263,7 @@ np_flush(Npreq *req, Npfcall *tc)
continue;
creq->flushed = 1;
if (req->conn->srv->flags & SRV_FLAGS_FLUSHSIG)
pthread_kill (creq->wthread->thread, SIGINT);
pthread_kill (creq->wthread->thread, SIGUSR2);
goto done;
}
}
Expand Down

0 comments on commit 725f7da

Please sign in to comment.