1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
|
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
|
appfs_tcl_ResetInterps();
appfs_get_path_info_cache_flush(-1, -1);
return;
}
/*
* Terminate a thread and release resources
*/
static void appfs_thread_exit(void) {
Tcl_Interp *interp;
pthread_exit(NULL);
interp = pthread_getspecific(interpKey);
if (interp != NULL) {
Tcl_DeleteInterp(interp);
}
return;
}
/*
* Signal handler to initiate a hot-restart
* Signal handler
* SIGHUP initiates a hot restart
* SIGUSR1 terminates the current thread
*/
static void appfs_signal_handler(int sig) {
/* Do not handle signals until FUSE has been started */
if (!appfs_fuse_started) {
return;
}
/* Request to perform a "hot" restart */
if (sig == SIGHUP) {
appfs_hot_restart();
}
/* Request to terminate the current request/thread */
if (sig == SIGUSR1) {
appfs_thread_exit();
}
return;
}
/*
* FUSE operations structure
*/
|