public inbox for dash@vger.kernel.org
 help / color / mirror / Atom feed
* Monitor mode handling (bug ?)
@ 2023-01-09 15:18 Ganael Laplanche
  2023-01-10 21:28 ` Jilles Tjoelker
  0 siblings, 1 reply; 32+ messages in thread
From: Ganael Laplanche @ 2023-01-09 15:18 UTC (permalink / raw)
  To: dash

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



^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2023-03-09 11:34 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-09 15:18 Monitor mode handling (bug ?) Ganael Laplanche
2023-01-10 21:28 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox