diff --git a/src/remote.ml b/src/remote.ml index 1439da367..02806a06b 100644 --- a/src/remote.ml +++ b/src/remote.ml @@ -1880,6 +1880,9 @@ let buildShellConnection shell host userOpt portOpt rootName termInteract = Don't let these signals reach ssh by blocking them. + Unfortunately, a bug introduced in OpenSSH 9.6 (also present in 9.7) + breaks this workaround by unblocking SIGINT in the ssh process. + The signals could be ignored instead of being blocked because ssh does not set handlers for SIGINT and SIGQUIT if they've been ignored at startup. But this triggers an error in ssh. The interactive diff --git a/src/uitext.ml b/src/uitext.ml index cf6881964..f4e112b72 100644 --- a/src/uitext.ml +++ b/src/uitext.ml @@ -786,6 +786,9 @@ let verifyMerge title text = true end +let intrcount = ref 0 +let intrRequested () = !intrcount <> 0 + type stateItem = { mutable ri : reconItem; mutable bytesTransferred : Uutil.Filesize.t; @@ -866,7 +869,6 @@ let doTransport reconItemList numskip isSkip = in Uutil.setProgressPrinter showProgress; - let intrcount = ref 0 in let sigtermHandler _ = if !intrcount >= 3 then raise Sys.Break; Abort.all (); @@ -1702,7 +1704,7 @@ and start2 () = exit exitStatus with | Sys.Break -> terminate () - | e when noRepeat || breakRepeat e -> begin + | e when noRepeat || breakRepeat e || intrRequested () -> begin handleException e; exit Uicommon.fatalExit end