From: Ganael Laplanche <ganael.laplanche@martymac.org>
To: dash@vger.kernel.org
Subject: Monitor mode handling (bug ?)
Date: Mon, 09 Jan 2023 16:18:02 +0100 [thread overview]
Message-ID: <7091680.J8PY2HnTC3@home.martymac.org> (raw)
Hello,
Digging into a problem with a project of mine [1], I found dash (0.5.12)
behaves differently from other POSIX-compliant shells when dealing with
monitor mode when running in the background.
In the following example, dash immediately sends a SIGTTIN signal that stops
the process group:
$ cat test.sh
set -m
$ dash test.sh &
[1] + suspended (tty input) dash test.sh
while other shells do not:
$ bash test.sh &
[1] + done bash test.sh
$ sh test.sh & # (/bin/sh from FreeBSD 13.1-RELEASE)
[1] + done sh test.sh
$ ksh93 test.sh &
[1] + done ksh93 test.sh
Is that an intended behaviour ?
Also, the following test leads to dash looping indefinitely and eating 100%
CPU:
$ cat test2.sh
trap '' 21
set -m
$ dash test2.sh &
It remains stuck within the following loop:
https://git.kernel.org/pub/scm/utils/dash/dash.git/tree/src/jobs.c?
h=v0.5.12#n208
Weird... Is that a dash bug or am I missing something?
Best regards,
Ganael.
[1] See https://github.com/martymac/fpart/issues/43 for more context
--
Ganael LAPLANCHE <ganael.laplanche@martymac.org>
http://www.martymac.org | http://contribs.martymac.org
FreeBSD: martymac <martymac@FreeBSD.org>, http://www.FreeBSD.org
next reply other threads:[~2023-01-09 15:19 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-09 15:18 Ganael Laplanche [this message]
2023-01-10 21:28 ` Monitor mode handling (bug ?) Jilles Tjoelker
2023-01-11 16:25 ` Ganael Laplanche
2023-01-11 16:37 ` Ganael Laplanche
2023-01-11 17:31 ` Steffen Nurpmeso
2023-01-12 11:40 ` Ganael Laplanche
2023-01-12 15:00 ` Steffen Nurpmeso
2023-01-13 11:44 ` Ganael Laplanche
2023-01-13 21:03 ` Steffen Nurpmeso
2023-01-16 11:15 ` Ganael Laplanche
2023-01-16 19:41 ` Steffen Nurpmeso
2023-01-17 15:05 ` Ganael Laplanche
2023-01-17 21:04 ` Steffen Nurpmeso
2023-01-18 11:40 ` Ganael Laplanche
2023-01-18 12:03 ` Ganael Laplanche
2023-01-18 23:15 ` Steffen Nurpmeso
2023-01-19 11:38 ` Ganael Laplanche
2023-01-19 18:33 ` Steffen Nurpmeso
2023-01-20 11:40 ` Ganael Laplanche
2023-01-27 10:21 ` Herbert Xu
2023-01-27 11:46 ` Ganael Laplanche
2023-01-30 7:21 ` Herbert Xu
2023-01-30 11:37 ` Ganael Laplanche
2023-01-31 3:20 ` Herbert Xu
2023-01-31 11:46 ` Ganael Laplanche
2023-03-08 11:47 ` Ganael Laplanche
2023-03-08 17:00 ` Steffen Nurpmeso
2023-03-09 5:55 ` Herbert Xu
2023-03-09 6:40 ` Ganael Laplanche
2023-03-09 9:22 ` Herbert Xu
2023-03-09 9:55 ` Herbert Xu
2023-03-09 11:34 ` Ganael Laplanche
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=7091680.J8PY2HnTC3@home.martymac.org \
--to=ganael.laplanche@martymac.org \
--cc=dash@vger.kernel.org \
/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