From mboxrd@z Thu Jan 1 00:00:00 1970
Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail
From: Philipp Stephani
Newsgroups: gmane.emacs.bugs
Subject: bug#41099: 28.0.50;
TRAMP process-file ignores exit status of remote process
Date: Wed, 6 May 2020 19:56:06 +0200
Message-ID:
References:
<871rnyyyio.fsf@gmx.de> <87sggdmp9s.fsf@gmx.de>
<87eerxwbjo.fsf@gmx.de> <87zhalrxyf.fsf@gmx.de>
<87o8r1rmwv.fsf@gmx.de>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202";
logging-data="89710"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: 41099@debbugs.gnu.org
To: Michael Albinus
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 06 19:57:30 2020
Return-path:
Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org
Original-Received: from lists.gnu.org ([209.51.188.17])
by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.92)
(envelope-from )
id 1jWOIT-000NCF-Oh
for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 May 2020 19:57:29 +0200
Original-Received: from localhost ([::1]:38674 helo=lists1p.gnu.org)
by lists.gnu.org with esmtp (Exim 4.90_1)
(envelope-from )
id 1jWOIS-0003Hp-Qx
for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 May 2020 13:57:28 -0400
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52018)
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from )
id 1jWOI2-0003GA-HA
for bug-gnu-emacs@gnu.org; Wed, 06 May 2020 13:57:02 -0400
Original-Received: from debbugs.gnu.org ([209.51.188.43]:57828)
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.90_1) (envelope-from )
id 1jWOI2-0004sA-6D
for bug-gnu-emacs@gnu.org; Wed, 06 May 2020 13:57:02 -0400
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
(envelope-from ) id 1jWOI2-0007ss-5q
for bug-gnu-emacs@gnu.org; Wed, 06 May 2020 13:57:02 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Philipp Stephani
Original-Sender: "Debbugs-submit"
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Wed, 06 May 2020 17:57:02 +0000
Resent-Message-ID:
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 41099
X-GNU-PR-Package: emacs
Original-Received: via spool by 41099-submit@debbugs.gnu.org id=B41099.158878778530258
(code B ref 41099); Wed, 06 May 2020 17:57:02 +0000
Original-Received: (at 41099) by debbugs.gnu.org; 6 May 2020 17:56:25 +0000
Original-Received: from localhost ([127.0.0.1]:41141 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1jWOHQ-0007ry-Pt
for submit@debbugs.gnu.org; Wed, 06 May 2020 13:56:24 -0400
Original-Received: from mail-oi1-f179.google.com ([209.85.167.179]:33437)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1jWOHP-0007rk-HP
for 41099@debbugs.gnu.org; Wed, 06 May 2020 13:56:23 -0400
Original-Received: by mail-oi1-f179.google.com with SMTP id o24so2563982oic.0
for <41099@debbugs.gnu.org>; Wed, 06 May 2020 10:56:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:cc; bh=5B7w6Z7ELazipSWlToYoOHppPe2+KZ+Cy/9Q/kUqD8M=;
b=GcrcC3LO0xNkin78q2Irf9kaLeYdCDjSPw2OkCdI4OHuMaLDFq93DkhU98t49Vl65O
dMinzMVhmeoMFDS0O7R9cUXU6O/6FAB3wJD7hs8YXY7qVQH2HVVLmJa1IzpwgsdfdHYt
nUqLqavK4+gK3uVEXRyuiGCWLOr5jZ2gRSdQ/vcdPvX14j9nJbB800vRXDRWHOJQxvuu
nIRM/9od8i3cjxx/m1UV/EB2uTVH6QY5rImqlSSRiJOBVcgCYF0+ND3ddj89z3fhnk2E
+8Wlx4SqJfDy7E/CiwTrIdnHEmCjAdcJ93InOTd3thi+aM6KxRfIY/JK5DO5HEC2Gh5X
7igg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc;
bh=5B7w6Z7ELazipSWlToYoOHppPe2+KZ+Cy/9Q/kUqD8M=;
b=RGZ5WI86KTDgk9a89XDQGOZ9fI5lAO1WAA7kuXDVtA745Emh058dqTunw5ltDrRXJI
nLTnf7/NSXLNf06ia848LFpYkHWBIhlnIN3nANjdrhS00O+TSMNndUBVSWS6MsJ91F7I
5GyETsapGJcdKE0aF34C3qUIqaN6OnH3Wpl6vugTy1gJLUJk4bkPiQTO/Qfk5DH7osxo
TP8x5L/pr8t6H0n/ZYclRiFVWSkQJtXRzr/IPig5UPJxlDpy/vNO/XiMusK9ImHCtT3k
m1P36y2nxG4FYZJp5OEIq3mZliKAbMLgjofHZYBW8LbNufxc5HVQOK9SXDf+1QhbnBm1
0/WA==
X-Gm-Message-State: AGi0PuaFgHkxvgBtaIG8KUhEIwie6omn7Uk3fsGBWHt6M87Mbqqapasn
NVN3gcW0ZK+Isswv2kCHgOO2XxRonyj7zPw38T7Ys2nslNw=
X-Google-Smtp-Source: APiQypLvcoO5JWeDhitdzECWOVpMZJYEBGy4QLMA5M3l25uYg8IkQeY6qGaCXOsBMlxKltQTB3zBCu/jO1d3csihqTo=
X-Received: by 2002:aca:d441:: with SMTP id l62mr3731281oig.9.1588787777926;
Wed, 06 May 2020 10:56:17 -0700 (PDT)
In-Reply-To: <87o8r1rmwv.fsf@gmx.de>
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-BeenThere: bug-gnu-emacs@gnu.org
List-Id: "Bug reports for GNU Emacs,
the Swiss army knife of text editors"
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org
Original-Sender: "bug-gnu-emacs"
Xref: news.gmane.io gmane.emacs.bugs:179831
Archived-At:
Am Mi., 6. Mai 2020 um 19:30 Uhr schrieb Michael Albinus
:
>
> Philipp Stephani writes:
>
> Hi Philipp,
>
> >> As a second step, consider also translating signals: if the exit code
> >> is > 128, subtract 128 and return an appropriate string, like
> >> call-process does.
> >
> > Try
> > (call-process "bash" nil nil nil "-c" "kill -SYS $$")
> > "Bad system call"
>
> I see. Hmm, this would require to install a trap handler in the remote
> shell, and to add a mechanism transferring its result back to
> Tramp. Don't know whether this is worth the effort.
That wouldn't work because Bash translates signals from subprocesses:
$ bash -c 'kill -SYS $$'; echo $?
Bad system call (core dumped)
159
The 159 here is 128 + the signal number.