Subject: Re: bug#50748: Acknowledgement (28.0.50; tramp-sh.el uses mknod file p which is not available on macos)

From: Michael Albinus <[email-masked]>
Date: Sat, 25 Sep 2021 15:03:31 +0200

Damien Merenne <[email-masked]> writes:

Hi Damien,

> Here it is, I also attached one with the stty command commented out
> for reference.

Nothing special in the traces, everything looks normal. So I would apply
the following patch, could you pls test?

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 7f1a52fa93..81b99b7c3c 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2938,7 +2938,11 @@ tramp-sh-handle-make-process
 			    (process-put p 'remote-pid pid)
 			    (tramp-set-connection-property p "remote-pid" pid))
 			  ;; Disable carriage return to newline translation.
-			  (when (memq connection-type '(nil pipe))
+			  (when (and (memq connection-type '(nil pipe))
+                                     (not (string-match-p
+		                           "Darwin"
+		                           (tramp-get-connection-property
+                                            v "uname" ""))))
 			    (tramp-send-command v "stty -icrnl"))
 			  ;; `tramp-maybe-open-connection' and
 			  ;; `tramp-send-command-and-read' could have

Best regards, Michael.