Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Mar 2024 13:16:13 +0100
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@FreeBSD.org>
To:        Mateusz Guzik <mjguzik@gmail.com>
Cc:        Konstantin Belousov <kib@freebsd.org>,  FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: truss -f timeout 2 sleep 10 causes breakage
Message-ID:  <86wmpnc1ki.fsf@ltc.des.dev>
In-Reply-To: <CAGudoHGCQsAPOQpHbb4TTon49K5BDh24af-VCN6LroOEcivPzA@mail.gmail.com> (Mateusz Guzik's message of "Wed, 27 Mar 2024 13:00:07 %2B0100")
References:  <CAGudoHGCQsAPOQpHbb4TTon49K5BDh24af-VCN6LroOEcivPzA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Mateusz Guzik <mjguzik@gmail.com> writes:
> Top of main, but I reproduced it on stable/14-e64d827d3 as well.

Confirmed on 14.0-RELEASE-p5.

> Mere "timeout 2 sleep 10" correctly times out.
>
> Running "truss -f timeout 2 sleep 10" prevents timeout from killing
> sleep

This is sort of expected as truss(1) uses ptrace(2) which breaks the
parent-child relationship, so you should never use `truss -f` with a
command that expects to control its children.

> and the entire thing refuses to exit, truss has to be killed off
> with SIGKILL.

This, however, is not expected.

> Here is the best part: after doing the above, going back to mere
> "timeout 2 sleep 10" (without truss!) no longer works

Neither is this.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86wmpnc1ki.fsf>