fuse_ipc.c (f05962453e84168a0c0e616372bc99f10754a947) | fuse_ipc.c (ed74f781c9f704092556f860a00b0bb53fdedff7) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-3-Clause 3 * 4 * Copyright (c) 2007-2009 Google Inc. and Amit Singh 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions are --- 424 unchanged lines hidden (view full) --- 433} 434 435static int 436fticket_wait_answer(struct fuse_ticket *ftick) 437{ 438 struct thread *td = curthread; 439 sigset_t blockedset, oldset; 440 int err = 0, stops_deferred; | 1/*- 2 * SPDX-License-Identifier: BSD-3-Clause 3 * 4 * Copyright (c) 2007-2009 Google Inc. and Amit Singh 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions are --- 424 unchanged lines hidden (view full) --- 433} 434 435static int 436fticket_wait_answer(struct fuse_ticket *ftick) 437{ 438 struct thread *td = curthread; 439 sigset_t blockedset, oldset; 440 int err = 0, stops_deferred; |
441 struct fuse_data *data; | 441 struct fuse_data *data = ftick->tk_data; |
442 bool interrupted = false; 443 | 442 bool interrupted = false; 443 |
444 if (fsess_isimpl(ftick->tk_data->mp, FUSE_INTERRUPT)) { | 444 if (fsess_isimpl(ftick->tk_data->mp, FUSE_INTERRUPT) && 445 data->dataflags & FSESS_INTR) { |
445 SIGEMPTYSET(blockedset); 446 } else { 447 /* Block all signals except (implicitly) SIGKILL */ 448 SIGFILLSET(blockedset); 449 } 450 stops_deferred = sigdeferstop(SIGDEFERSTOP_SILENT); 451 kern_sigprocmask(td, SIG_BLOCK, NULL, &oldset, 0); 452 453 fuse_lck_mtx_lock(ftick->tk_aw_mtx); 454 455retry: 456 if (fticket_answered(ftick)) { 457 goto out; 458 } | 446 SIGEMPTYSET(blockedset); 447 } else { 448 /* Block all signals except (implicitly) SIGKILL */ 449 SIGFILLSET(blockedset); 450 } 451 stops_deferred = sigdeferstop(SIGDEFERSTOP_SILENT); 452 kern_sigprocmask(td, SIG_BLOCK, NULL, &oldset, 0); 453 454 fuse_lck_mtx_lock(ftick->tk_aw_mtx); 455 456retry: 457 if (fticket_answered(ftick)) { 458 goto out; 459 } |
459 data = ftick->tk_data; | |
460 461 if (fdata_get_dead(data)) { 462 err = ENOTCONN; 463 fticket_set_answered(ftick); 464 goto out; 465 } 466 kern_sigprocmask(td, SIG_BLOCK, &blockedset, NULL, 0); 467 err = msleep(ftick, &ftick->tk_aw_mtx, PCATCH, "fu_ans", --- 631 unchanged lines hidden --- | 460 461 if (fdata_get_dead(data)) { 462 err = ENOTCONN; 463 fticket_set_answered(ftick); 464 goto out; 465 } 466 kern_sigprocmask(td, SIG_BLOCK, &blockedset, NULL, 0); 467 err = msleep(ftick, &ftick->tk_aw_mtx, PCATCH, "fu_ans", --- 631 unchanged lines hidden --- |