X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=IRkTpFPKCtyRSGh/ 0hh4DxeRFWa8ew6vhDHZeTlf/psqdv3NLumd4MXXd9aBsWsFuBEwLWS/qOQwjE5c GpN44NajAtpLChbwIlmEyk8N/utW5MPcPulwmfGlV+YVBFPyOOPD2NC86J3P8LrY V0E1gPbpbSfaNrQPqM8R9z3pC+s= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=sPXXW7dVOp18dgPBjhhK5b 7EGfA=; b=u2bEW3xZF6Wt17DXoAps11uuueexP1SCfjpJtpAyYFF25IREBthNHL vIr2TXrCvI8WXxlcJzs+vOdGyg19+44jqv0hjM4WKfde9N2ii+I5sZXyUBl37H+4 7T9H2NRft2nlImH4r04odDYdMqqHN9+d3LLzLMOm6Hc1wghStWoXM= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 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) Subject: Re: Bash monitor mode remains enabled if disabled in .bashrc To: cygwin AT cygwin DOT com References: <000701d321e7$6ed52220$4c7f6660$@rogers.com> From: cyg Simple Message-ID: <54420842-610d-aa87-5000-5c531cf7d2a1@gmail.com> Date: Thu, 31 Aug 2017 08:31:22 -0400 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 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