forked from openzfs/zfs
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add SIGSTOP and SIGTSTP handling to issig
This change adds SIGSTOP and SIGTSTP handling to the issig function; this mirrors its behavior on Solaris. This way, long running kernel tasks can be stopped with the appropriate signals. Note that doing so with ctrl-z on the command line doesn't return control of the tty to the shell, because tty handling is done separately from stopping the process. That can be future work, if people feel that it is a necessary addition. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Signed-off-by: Paul Dagnelie <pcd@delphix.com> Issue openzfs#810 Issue openzfs#10843 Closes openzfs#11801
- Loading branch information
1 parent
d9374e5
commit 9b80856
Showing
7 changed files
with
134 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
dnl # | ||
dnl # 4.20 API change | ||
dnl # Added kernel_siginfo_t | ||
dnl # | ||
AC_DEFUN([ZFS_AC_KERNEL_SRC_SIGINFO], [ | ||
ZFS_LINUX_TEST_SRC([siginfo], [ | ||
#include <linux/signal_types.h> | ||
],[ | ||
kernel_siginfo_t info __attribute__ ((unused)); | ||
]) | ||
]) | ||
|
||
AC_DEFUN([ZFS_AC_KERNEL_SIGINFO], [ | ||
AC_MSG_CHECKING([whether kernel_siginfo_t tyepedef exists]) | ||
ZFS_LINUX_TEST_RESULT([siginfo], [ | ||
AC_MSG_RESULT(yes) | ||
AC_DEFINE(HAVE_SIGINFO, 1, [kernel_siginfo_t exists]) | ||
],[ | ||
AC_MSG_RESULT(no) | ||
]) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
dnl # | ||
dnl # 4.4 API change | ||
dnl # Added kernel_signal_stop | ||
dnl # | ||
AC_DEFUN([ZFS_AC_KERNEL_SRC_SIGNAL_STOP], [ | ||
ZFS_LINUX_TEST_SRC([signal_stop], [ | ||
#include <linux/sched/signal.h> | ||
],[ | ||
kernel_signal_stop(); | ||
]) | ||
]) | ||
|
||
AC_DEFUN([ZFS_AC_KERNEL_SIGNAL_STOP], [ | ||
AC_MSG_CHECKING([whether signal_stop() exists]) | ||
ZFS_LINUX_TEST_RESULT([signal_stop], [ | ||
AC_MSG_RESULT(yes) | ||
AC_DEFINE(HAVE_SIGNAL_STOP, 1, [signal_stop() exists]) | ||
],[ | ||
AC_MSG_RESULT(no) | ||
]) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
dnl # | ||
dnl # 4.17 API change | ||
dnl # Added set_special_state() function | ||
dnl # | ||
AC_DEFUN([ZFS_AC_KERNEL_SRC_SET_SPECIAL_STATE], [ | ||
ZFS_LINUX_TEST_SRC([set_special_state], [ | ||
#include <linux/sched.h> | ||
],[ | ||
set_special_state(TASK_STOPPED); | ||
]) | ||
]) | ||
|
||
AC_DEFUN([ZFS_AC_KERNEL_SET_SPECIAL_STATE], [ | ||
AC_MSG_CHECKING([whether set_special_state() exists]) | ||
ZFS_LINUX_TEST_RESULT([set_special_state], [ | ||
AC_MSG_RESULT(yes) | ||
AC_DEFINE(HAVE_SET_SPECIAL_STATE, 1, [set_special_state() exists]) | ||
],[ | ||
AC_MSG_RESULT(no) | ||
]) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters