Overview
Comment: | Removed interruption support, there is no clean way to implement it |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: | 39025b67ed47e421204cbec8e43352992a4ce139 |
User & Date: | rkeene on 2014-11-12 05:09:40 |
Other Links: | manifest | tags |
Context
2014-11-12
| ||
05:46 | Fixed actual problem with interruptions (which was really unrelated) -- Tcl notifier thread is terminated on fork() called by fuse_main(), since we create a Tcl interpreter for testing before calling fuse_main() the notifier dies and is not restarted. We now terminate it before fork(). check-in: 0819a7a89c user: rkeene tags: trunk | |
05:09 | Removed interruption support, there is no clean way to implement it check-in: 39025b67ed user: rkeene tags: trunk | |
2014-11-11
| ||
19:10 | Added SIGUSR1 handling for terminating a thread check-in: 6eb9af02d5 user: rkeene tags: trunk | |
Changes
Modified appfsd.c from [843bfcfd7e] to [30750361ba].
1466 1466 } 1467 1467 1468 1468 /* 1469 1469 * Hot-restart support 1470 1470 */ 1471 1471 /* Initiate a hot-restart */ 1472 1472 static void appfs_hot_restart(void) { 1473 + APPFS_DEBUG("Asked to initiate hot restart"); 1474 + 1473 1475 appfs_tcl_ResetInterps(); 1474 1476 appfs_get_path_info_cache_flush(-1, -1); 1475 1477 1476 1478 return; 1477 1479 } 1478 1480 1479 -/* 1480 - * Terminate a thread and release resources 1481 - */ 1482 -static void appfs_thread_exit(void) { 1483 - Tcl_Interp *interp; 1484 - 1485 - pthread_exit(NULL); 1486 - 1487 - interp = pthread_getspecific(interpKey); 1488 - if (interp != NULL) { 1489 - Tcl_DeleteInterp(interp); 1490 - } 1491 - 1492 - return; 1493 -} 1494 - 1495 1481 /* 1496 1482 * Signal handler 1497 1483 * SIGHUP initiates a hot restart 1498 - * SIGUSR1 terminates the current thread 1499 1484 */ 1500 1485 static void appfs_signal_handler(int sig) { 1501 1486 /* Do not handle signals until FUSE has been started */ 1502 1487 if (!appfs_fuse_started) { 1503 1488 return; 1504 1489 } 1505 1490 1506 1491 /* Request to perform a "hot" restart */ 1507 1492 if (sig == SIGHUP) { 1508 1493 appfs_hot_restart(); 1509 1494 } 1510 1495 1511 - /* Request to terminate the current request/thread */ 1512 - if (sig == SIGUSR1) { 1513 - appfs_thread_exit(); 1514 - } 1515 - 1516 1496 return; 1517 1497 } 1518 1498 1519 1499 /* 1520 1500 * FUSE operations structure 1521 1501 */ 1522 1502 static struct fuse_operations appfs_operations = { ................................................................................ 1658 1638 fprintf(stderr, "Hot-restart will not be available.\n"); 1659 1639 } 1660 1640 1661 1641 /* 1662 1642 * Add FUSE arguments which we always supply 1663 1643 */ 1664 1644 fuse_opt_parse(&args, NULL, NULL, appfs_fuse_opt_cb); 1665 - fuse_opt_add_arg(&args, "-odefault_permissions,fsname=appfs,subtype=appfsd,use_ino,kernel_cache,entry_timeout=0,attr_timeout=0,intr,big_writes,hard_remove"); 1645 + fuse_opt_add_arg(&args, "-odefault_permissions,fsname=appfs,subtype=appfsd,use_ino,kernel_cache,entry_timeout=0,attr_timeout=0,big_writes,hard_remove"); 1666 1646 1667 1647 if (getuid() == 0) { 1668 1648 fuse_opt_parse(&args, NULL, NULL, NULL); 1669 1649 fuse_opt_add_arg(&args, "-oallow_other"); 1670 1650 } 1671 1651 1672 1652 /*