From: Pavel Fedin <p.fedin@samsung.com>
To: 'Marco Atzeri' <marco.atzeri@gmail.com>, cygwin@cygwin.com
Subject: RE: Bug: bash -e misbehaves with several nested
Date: Thu, 25 May 2017 10:31:00 -0000 [thread overview]
Message-ID: <000e01d2d53d$57318470$05948d50$@samsung.com> (raw)
In-Reply-To: <be033564-acfc-1d1a-bc4c-9cbbb73b155f@gmail.com>
Hello!
> > Hello! I'd like to report a strange bug in 64-bit bash. The following script:
> >
> > ---- cut ---
> > #/bin/bash -e
> >
> > DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
> > echo Works: $DIR
> > ---- cut ---
> >
> > Simply exits and produces no output (never reaches echo). The same script works perfectly
> on 32 bits. Versions are the same:
> >
> > --- cut ---
>
> It works fine for me.
>
> $ ./prova.bash
> Works: /tmp
Huh, works here too, indeed. But there's one little thing. If you just copypasted this from my email, then you probably miss "#!"
(there's just "#", since i retyped the header, and made a typo). And with this typo it really works for some reason. Could you make
sure once again ?
Apparently it has to do with -e switch.
Kind regards,
Pavel Fedin
Senior Engineer
Samsung Electronics Research center Russia
> -----Original Message-----
> From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] On Behalf Of Marco Atzeri
> Sent: Wednesday, May 24, 2017 8:41 PM
> To: cygwin@cygwin.com
> Subject: Re: Bug: bash -e misbehaves with several nested
>
> On 24/05/2017 14:54, Pavel Fedin wrote:
> > Hello! I'd like to report a strange bug in 64-bit bash. The following script:
> >
> > ---- cut ---
> > #/bin/bash -e
> >
> > DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
> > echo Works: $DIR
> > ---- cut ---
> >
> > Simply exits and produces no output (never reaches echo). The same script works perfectly
> on 32 bits. Versions are the same:
> >
> > --- cut ---
>
> It works fine for me.
>
> $ ./prova.bash
> Works: /tmp
>
>
> $ uname -svr
> CYGWIN_NT-6.1 2.8.0(0.309/5/3) 2017-04-01 20:47
>
>
> --
> Problem reports: http://cygwin.com/problems.html
> FAQ: http://cygwin.com/faq/
> Documentation: http://cygwin.com/docs.html
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
>
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
next prev parent reply other threads:[~2017-05-25 9:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170524125429eucas1p1384ad5e0c60eb4974a0f57e0f0203d9a@eucas1p1.samsung.com>
2017-05-24 15:55 ` Pavel Fedin
2017-05-24 19:32 ` Marco Atzeri
2017-05-25 10:31 ` Pavel Fedin [this message]
2017-05-25 13:35 ` Marco Atzeri
2017-05-31 9:48 ` Pavel Fedin
2017-05-25 14:54 ` Andrey Repin
2017-05-25 18:03 ` Brian Inglis
2017-11-10 16:43 ` Pavel Fedin
2017-11-11 18:12 ` Brian Inglis
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='000e01d2d53d$57318470$05948d50$@samsung.com' \
--to=p.fedin@samsung.com \
--cc=cygwin@cygwin.com \
--cc=marco.atzeri@gmail.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).