From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 32456 invoked from network); 14 Jan 2022 14:08:40 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 14 Jan 2022 14:08:40 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1642169320; b=a2SBMZqVRJzP2ndutjvd9/FVnX7BG8HtbpBq9UuTV94D6rqC0RuRVAhKKHDcftCFyofS09L4d/ AhzifUY3hJRnXZJ4YQ2zXLQ3/P6pQGMuWKK5MT3J8LvUJoqA/bj13kolLW1HRqGewJ+Q/7qjNb 6NKN3io8Zu7hXBU32AclyQgk2hdjNefJCFfG9n4eC8G0Z4LyDtwyyPNz1Xz5CeMdr2kIYDodjV AsuQOgKow5OvmPnKPe7oaL4seDrR+UVqJ5eH8UKQ0UqsxwEWfFAy1Dokiu9guSmEeuClbLS5DZ jEQE/buMuT3p1mVb7Qdi7VB3N5WQmcMPP9+vTTEEHH8+Jw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (plesk3-37.odn.de) smtp.remote-ip=212.34.167.37; dmarc=none header.from=7x.de; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1642169320; bh=W/YZSOs5Za6rzjDLxJH/lDXawK+Qx7xt6sdKBUX6RMs=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:MIME-Version:Content-Type:Date:To: From:Subject:Message-ID:DKIM-Signature; b=MCrNV+mqxJt+GRHS2aYzIpb4JfxdWVt0A/vjuBS3SSsNhPIKqBAM1k5o7i/AWE+UsX/c0UPCt4 9URjU/cfUvgGZWThcE/dfZwqho3iSeyxiQuKTvkuUl6U8TdmbKPSQWuSHvOxh+35z5E1+9TwWn 7+wiZiwn2L303XtywAoSxpTiwlx4GlofHFc3HVMZjIEs6e/Y/Ta33/7W5SZ60GPcXgAmHjq9VH 4WJv0WTLvu3fSzShc1flF/eodnbo6llipl/L19MkRKZO0Jx55yQbgg5QtpalqiUiQRcB8cZ4dl HMA5j0Rj40prVBFmGBhTTZvxcKT5jtUX7Q5C5AEOuOi8UA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: MIME-Version:Content-Type:Date:To:From:Subject:Message-ID:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References; bh=ype18qldwixRFAQoL2vwPh7NTbNm2t2vx37vKQ7hrtQ=; b=jIjToSXXjmRHqzW1GVTu65Gyd8 Z7vXE1DiJ/NbCjsxCF9P+Fu1mGFBoa2Bl8mupEBvfHOcyi/GOrwW0YgLPglehuKTRGLu10IfoTwv8 34FbXTihpriXmL4leqXIqu8u+LQNolAqX2b9nZNRePzartVODnSo0bRAKcWLS2a2qh53siVQIW8OM dFkiqlFKQyXuYmV3XCLjQUXPpngkgsd2PFmmwtJwNajXSjoR6MM3IRkIKOgdEyRvCbqG0nwMEsvQX S6fLDkZ6EvoddSikNteuvEq7IMN1YokFYrxY5QJQeu1+XiNWG16fmyfO8mqKeU2Hv8j2hhnxEdwC+ j4WhHdfg==; Received: from authenticated user by zero.zsh.org with local id 1n8NFw-000KvE-3h; Fri, 14 Jan 2022 14:08:40 +0000 Authentication-Results: zsh.org; iprev=pass (plesk3-37.odn.de) smtp.remote-ip=212.34.167.37; dmarc=none header.from=7x.de; arc=none Received: from plesk3-37.odn.de ([212.34.167.37]:47431 helo=plesk3.odn.de) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1n8NFA-000KEH-Bk; Fri, 14 Jan 2022 14:07:52 +0000 Received: from taf.dhcp.fh-bielefeld.de (212-201-138-161.fh-bielefeld.de [212.201.138.161]) by plesk3.odn.de (Postfix) with ESMTPSA id 34F331B4016D for ; Fri, 14 Jan 2022 15:07:51 +0100 (CET) Message-ID: <6886b4278c2d2ce627ce3e48bd9d3034e5f66e78.camel@7x.de> Subject: Reverting the effect of 'setopt nomonitor' executed during shell startup From: Andreas Hartmann To: zsh-users@zsh.org Date: Fri, 14 Jan 2022 15:07:50 +0100 Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.3 (flatpak git) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-PPP-Message-ID: <20220114140751.8146.12746@plesk3.odn.de> X-PPP-Vhost: 7x.de X-Seq: 27471 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Hello, I'm currently fighting with some zsh behavior that I can't quite explain to myself. I use zplug along with zsh, and I believe that whenever zplug calls 'setopt nomonitor' during its setup, any subsequent call to e.g. `stty icanon` will suspend the shell with a SIGTTOU. At least if I comment out calls to 'setopt nomonitor' in zplugs startup, this behavior doesn't occur. This change in shell options is so persistent in fact, that even passing "setopt monitor" to negate the effect along in the same command doesn't change this behavior back to the unmodified one. Using setopt I can see that this is the only change performed to the shell, and furthermore no changes are applied to the stty (like `stty nostop`, which has the same effect). Here's a minimal working example (if you use zplug it works, can't reproduce it without zplug and I don't know why...): #!/usr/bin/zsh /usr/bin/zsh -i -c "echo foo;" stty icanon echo "bar" If you run this script it will become suspended upon calling `stty icanon`. `icanon` here is just one of many options, I think pretty much any argument to stty will work for that matter... Is there a way to "fix" options at shell startup such that they cannot ever be overwritten from within the shell? Or has someone else experienced this already and knows how to mitigate it? Thank you in advance! Best, hartan