X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=nfs3%2Fnfsd.c;h=f9cbd7f9d598299e6509825e746c59b63ace47f7;hb=7daddca3715fee8a3bfff417e769ff08dd7f4cbf;hp=b2e10713de2a473900af2b3275ad114712c9a66a;hpb=af3612a90a6e83dec51de3f33fc46a29d4c6c339;p=bluesky.git diff --git a/nfs3/nfsd.c b/nfs3/nfsd.c index b2e1071..f9cbd7f 100644 --- a/nfs3/nfsd.c +++ b/nfs3/nfsd.c @@ -26,11 +26,20 @@ void register_rpc(); BlueSkyFS *fs; BlueSkyStore *store; +static void shutdown_handler(int num) +{ + g_print("SIGINT caught, shutting down...\n"); + g_print("Proxy statistics:\n"); + bluesky_stats_dump_all(); + exit(1); +} + int main(int argc, char *argv[]) { int i; signal(SIGPIPE, SIG_IGN); + signal(SIGINT, shutdown_handler); bluesky_init(); g_set_prgname("nfsd"); @@ -44,8 +53,6 @@ int main(int argc, char *argv[]) register_rpc(); - bluesky_debug_dump(fs); - svc_run(); fprintf(stderr, "%s", "svc_run returned"); exit(1);