From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 80981 invoked by alias); 31 Aug 2017 12:31:30 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 80931 invoked by uid 89); 31 Aug 2017 12:31:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=Michel, Playing, H*f:sk:000701d, HContent-Transfer-Encoding:8bit X-HELO: mail-io0-f177.google.com Received: from mail-io0-f177.google.com (HELO mail-io0-f177.google.com) (209.85.223.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 31 Aug 2017 12:31:19 +0000 Received: by mail-io0-f177.google.com with SMTP id 81so21702853ioj.5 for ; Thu, 31 Aug 2017 05:31:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=h6Xea0px7cK5Xb66MTd7A9bRrXf/dlFkVYMkLykAHfY=; b=gD/QeZUJE6oFZME2aoI98u1ii01WkmD7CYUN12o0ZPwnkC1QJ14EjFN91/fbSG5wom aL+qhacGOXzpS+eJtx7ipZqNEC4FszV/7i+W6/qiVOZP9iaNeVOTzHj8Ol6hjUDn9bkM p0EAgIP0g5pscILPK4TKZcb5LmlkKxYu0XViUgC+4HwhndRjGD9vyzv/j0mUPGKlGdWQ b3WgZyDKVt574M6yp78Vrx1HaA3byKqKhw4V6e86kDOZgL4A6gsCjD5b1k+7hgzQkVY1 4Yva4K4DA/vGy/mbe3doJGN64fIakuH9Sy2ERScqkHcyAbSo5E8SV7L1eLM0LLNhIX9R yCmA== X-Gm-Message-State: AHPjjUgeGKneuoI9579kHuO20VIHJCSq88i7V/lzxuMfsIIvZQCLWy5h tPaKIr6uXGDZBa1A X-Google-Smtp-Source: ADKCNb5oYeJj+Rgwjgv41FVb3qzWk6ZrExWSo70Mqdb7xQn35B4ld68img8rkymSPibPfUMtfhEx5Q== X-Received: by 10.107.52.71 with SMTP id b68mr4589507ioa.352.1504182677807; Thu, 31 Aug 2017 05:31:17 -0700 (PDT) Received: from [192.168.0.6] (d4-50-42-50.try.wideopenwest.com. [50.4.50.42]) by smtp.gmail.com with ESMTPSA id w82sm26013itf.13.2017.08.31.05.31.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Aug 2017 05:31:17 -0700 (PDT) Subject: Re: Bash monitor mode remains enabled if disabled in .bashrc To: cygwin@cygwin.com References: <000701d321e7$6ed52220$4c7f6660$@rogers.com> From: cyg Simple Message-ID: <54420842-610d-aa87-5000-5c531cf7d2a1@gmail.com> Date: Thu, 31 Aug 2017 12:31:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <000701d321e7$6ed52220$4c7f6660$@rogers.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2017-08/txt/msg00276.txt.bz2 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