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: Thu, 14 May 2020 16:48:22 +0200 Message-ID: References: <871rnyyyio.fsf@gmx.de> <87sggdmp9s.fsf@gmx.de> <87eerxwbjo.fsf@gmx.de> <87zhalrxyf.fsf@gmx.de> <87o8r1rmwv.fsf@gmx.de> <871rnwrvvn.fsf@gmx.de> <87v9kzl2ga.fsf@gmail.com> <87a72akcgz.fsf@gmx.de> <85zhaafw4k.fsf@gmail.com> 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="44602"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 41099@debbugs.gnu.org, Michael Albinus To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 14 17:02:19 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 1jZFNG-000BKO-20 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 May 2020 17:02:14 +0200 Original-Received: from localhost ([::1]:35100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZFNE-0004CW-Vq for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 May 2020 11:02:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43222) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZFAV-00032b-2m for bug-gnu-emacs@gnu.org; Thu, 14 May 2020 10:49:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51088) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jZFAU-0003lE-OG for bug-gnu-emacs@gnu.org; Thu, 14 May 2020 10:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jZFAU-0008BL-KZ for bug-gnu-emacs@gnu.org; Thu, 14 May 2020 10:49: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: Thu, 14 May 2020 14:49: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.158946772231414 (code B ref 41099); Thu, 14 May 2020 14:49:02 +0000 Original-Received: (at 41099) by debbugs.gnu.org; 14 May 2020 14:48:42 +0000 Original-Received: from localhost ([127.0.0.1]:34401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZFA9-0008Ac-M3 for submit@debbugs.gnu.org; Thu, 14 May 2020 10:48:41 -0400 Original-Received: from mail-ot1-f53.google.com ([209.85.210.53]:45341) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZFA7-0008AM-Eh for 41099@debbugs.gnu.org; Thu, 14 May 2020 10:48:40 -0400 Original-Received: by mail-ot1-f53.google.com with SMTP id c3so2502359otr.12 for <41099@debbugs.gnu.org>; Thu, 14 May 2020 07:48:39 -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=WS9SsGM2APEGhKLrwYWYU5RFWJwIWj67v9qhbcf5RVE=; b=vZ0U/GEBEGF4DBPrwhl8oWu036VQCFpaIrzaWDvLmNhmRM3IlNKwAqEDE5ZQmHZYcb ITkrN7vbMQZWFKU1nFopW9TA1NFXn0uBZmK2xTrdGx1wD3oaN0WX/4eIj8kxxl/VzOP6 l8KROLUjnoalRvemNQCve+9wDV3N6rDWBEvN6vmjwK+UefKOCvm32Lgrb6JSMjy3Arx4 xqHu5bZ47HTceQNXd6V47llBjX4UY3OowtD/cgRfypQfVLMm7qPAWb9mph+8bry1U0qy XiLnK9qkuligbokuISDsoq9QLqbEttOZOOni8b4YXSzogHreX1FCqPPstjQTszOrhzor qncA== 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=WS9SsGM2APEGhKLrwYWYU5RFWJwIWj67v9qhbcf5RVE=; b=H7RqPS1y7fEw1Q3CUily8V6hvsxAZBeDrx2GlIRqgiljTayYgiHiZ61LX+oCAJ29ku eIpGvW/XNZk1cupN6bfPBzz3mWCMqnJyX1BoZIu7b+O/1dJU9DgbbLDZc7QMZdmbU5sg A6biyJYfRGbdYRzR0IlG+OFng+KBv1GC5TCR2WsgayeWGBhve8HV4R1ONcs7bfSMPGYv 6j1JC7+Tphs0EX+49RlBUiVRJ5A55g3LIg5i2aLit8bGqKno1JlgumylZ7h528Kwq9Fn etLiAKK6kyBD/xKqoSE9s9Ho+4UicBbpCtnSOnJf71QYUcoCoRxg5O0KI3whXj9hS7BJ bhhw== X-Gm-Message-State: AOAM533yX2yqUmtOfyWTarL6EAGq/tTLsNC5Zs8QzVbqFUKg6TM35TB+ FlNnNdhwV1+CqfkAtti1rLI/FawQwqednzHNLdM= X-Google-Smtp-Source: ABdhPJzJ3507V6WbTOctQmWKXYyFAWjGRpzVmDcN0YwlQnCKxKbD4b8CMDQHk300+rD1+laEN32y882UhD/zJRHVBCs= X-Received: by 2002:a9d:4c88:: with SMTP id m8mr3470439otf.149.1589467713476; Thu, 14 May 2020 07:48:33 -0700 (PDT) In-Reply-To: <85zhaafw4k.fsf@gmail.com> 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:180213 Archived-At: Am Do., 14. Mai 2020 um 16:07 Uhr schrieb Noam Postavsky : > > Philipp Stephani writes: > > > Am Do., 14. Mai 2020 um 13:00 Uhr schrieb Michael Albinus > > : > > >> I see. A short test shows, that git is using exit code 129 in case of > >> error in invocation, although it isn't documented in the man pages. > >> > >> Hmm, this seems to be a contradiction to the specification of reserved > >> exit codes, as described in . > >> We cannot change git > > > > We can at least file a bug against Git. > > > >> so either > >> > >> - we keep Tramp's process-file implementation as it is, > > > > I'd (naturally) prefer that way. Exit codes > 128 are nonportable, as > > they don't allow shells to detect signals. > > I don't think this is a correct description. Bash has the convention > that it uses codes > 128 to indicate commands terminated by signals. > But processes other than bash (like git) don't necessarily follow this > convention. The shell can still detect the signals, it's shell > *scripts* that will have the problem (when running commands that use > exit codes > 128). Yes, I mean scripts here. (TRAMP essentially runs a bunch of shell scripts.) Since Unix binaries get invoked from shell scripts regularly, they better behave in a predictable way. Bash scripts will regularly assume that an exit code > 128 means termination by signal, so these binaries are not portable in that sense. > > >> - we don't return a string in case a signal has interrupted the process, > > Since we don't have a reliable way to detect signals, I think this is > the only viable option. I'd expect the vast majority of programs to avoid such exit codes, precisely because they would want to allow portable usage in shell scripts. So I expect that the current behavior in master provides the "correct" result in the majority of cases.