public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: cyg Simple <cygsimple@gmail.com>
To: cygwin@cygwin.com
Subject: Re: Bash monitor mode remains enabled if disabled in .bashrc
Date: Thu, 31 Aug 2017 12:31:00 -0000	[thread overview]
Message-ID: <54420842-610d-aa87-5000-5c531cf7d2a1@gmail.com> (raw)
In-Reply-To: <000701d321e7$6ed52220$4c7f6660$@rogers.com>

On 8/30/2017 7:26 PM, Michel LaBarre wrote:
> Playing with set -m/+m and shopt -s lastpipe, in an interactive bash shell,
> I came across a situation 
> which is minor unless  it has broader implications for others that I do not
> know about.
> 
> Specifically if "set +m" is present in  .bashrc, it looks like job control
> (monitor mode) is off 
> in an interactive shell (as per "echo $-") but it is actually on.
> 
> I ran into this with "shopt -s lastpipe" behaviour with and without job
> control.
> I can also reproduce it with "sleep 25&" then "fg" will fail with "no job
> control".
> 
> If I "set +m" within the interactive shell rather than, or in addition to,
> .bashrc, both the 
> flags ($-) and behaviour (lastpipe and fg) reflect job control being off.
> 

Are you sure that .bashrc is being sourced?  The initial start of an
interactive shell doesn't read .bashrc by default.  It reads
.bash_profile when starting interactive mode.  Now most likely your
.bash_profile contains lines to check the existence of .bashrc and
source it but you need to check.

-- 
cyg 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

  reply	other threads:[~2017-08-31 12:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-30 23:26 Michel LaBarre
2017-08-31 12:31 ` cyg Simple [this message]
     [not found]   ` <000601d32265$f9f85880$ede90980$@rogers.com>
2017-08-31 15:50     ` cyg Simple

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=54420842-610d-aa87-5000-5c531cf7d2a1@gmail.com \
    --to=cygsimple@gmail.com \
    --cc=cygwin@cygwin.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).