Re: [PATCH 12/34] fuzzy: kill subprocesses with SIGPIPE, not SIGINT

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Tue, Feb 11, 2025 at 07:33:48PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
> 
> The next patch in this series fixes various issues with the recently
> added fstests process isolation scheme by running each new process in a
> separate process group session.  Unfortunately, the processes in the
> session are created with SIGINT ignored by default because they are not
> attached to the controlling terminal.  Therefore, switch the kill signal
> to SIGPIPE because that is usually fatal and not masked by default.
> 
> Signed-off-by: "Darrick J. Wong" <djwong@xxxxxxxxxx>
> ---
>  common/fuzzy |   13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)

I thought I reviewed this, must have missed it.

> diff --git a/common/fuzzy b/common/fuzzy
> index 0a2d91542b561e..e9df956e721949 100644
> --- a/common/fuzzy
> +++ b/common/fuzzy
> @@ -891,7 +891,7 @@ __stress_xfs_scrub_loop() {
>  	local runningfile="$2"
>  	local scrub_startat="$3"
>  	shift; shift; shift
> -	local sigint_ret="$(( $(kill -l SIGINT) + 128 ))"
> +	local signal_ret="$(( $(kill -l SIGPIPE) + 128 ))"
>  	local scrublog="$tmp.scrub"
>  
>  	while __stress_scrub_running "$scrub_startat" "$runningfile"; do
> @@ -902,7 +902,7 @@ __stress_xfs_scrub_loop() {
>  		_scratch_scrub "$@" &> $scrublog
>  		res=$?
>  		if [ "$res" -eq "$sigint_ret" ]; then

s/sigint_ret/signal_ret/

Otherwise looks fine, so with that fixed:

Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>

-Dave.

-- 
Dave Chinner
david@xxxxxxxxxxxxx




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux