ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Vladislav Zavjalov <slazav@altlinux.org>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] [#210675] EPERM bash.git=4.2.53-alt1
Date: Fri, 27 Jul 2018 15:36:07 +0300
Message-ID: <20180727123607.GA9335@imap.altlinux.org> (raw)
In-Reply-To: <CA+qzennqHkeP53FMcsK0m8z4vO7zrg1TEghkyFud_ZZ9FEKfZw@mail.gmail.com>

On Fri, Jul 27, 2018 at 03:30:52PM +0300, Alexey Tourbin wrote:
> 2018-07-27 15:25 GMT+03:00 Paul Wolneykien <manowar@altlinux.org>:
> > А через || можно переписать, или не сработает?
> >
> > (...) || rc=$?
> 
> if/or отрубает режим -e внутри кода, у которого проверяется статус
> возврата. Это известная багофича стандартного шелла, которая скорее
> всего никогда не будет исправлена. Поэтому приходится извращаться.
> 
> $ sh -e -c '(false; echo a)'
> $ sh -e -c '(false; echo a) ||:'
> a

Ага, я когда-то придумывал загадку на эту тему. Угадайте результат,
не запуская команды:

$ sh -e -c '! true; echo OK'
$ sh -e -c 'false; echo OK'
$ sh -e -c 'false && false; echo OK'
$ sh -e -c 'false && true; echo OK'
$ sh -e -c 'true && false; echo OK'



      reply	other threads:[~2018-07-27 12:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-24  9:15 ` Aleksei Nikiforov
2018-07-24  9:25   ` Michael Shigorin
2018-07-24  9:33     ` Aleksei Nikiforov
2018-07-24  9:45       ` Alexey Tourbin
2018-07-24 11:29   ` Dmitry V. Levin
2018-07-24 12:09     ` Alexey Tourbin
2018-07-24 12:45       ` Michael Shigorin
2018-07-24 12:47         ` Anton Farygin
2018-07-24 13:07         ` Alexey Tourbin
2018-07-27 12:17           ` Alexey Tourbin
2018-07-27 12:25             ` Paul Wolneykien
2018-07-27 12:30               ` Alexey Tourbin
2018-07-27 12:36                 ` Vladislav Zavjalov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180727123607.GA9335@imap.altlinux.org \
    --to=slazav@altlinux.org \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git