"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Omar Polo <op@omarpolo.com>
Subject:
Re: regress: do not use job control, timeout(1)
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
gameoftrees@openbsd.org
Date:
Thu, 02 May 2024 10:30:14 +0200

Download raw body.

Thread
On 2024/05/01 23:00:31 +0200, Christian Weisgerber <naddy@mips.inka.de> wrote:
> And of course I was testing this directly.  Running it through
> make(1) creates more complications.  Belay the diff.

Not sure if it would help, but since we use that idiom to either start a
perl script that behaves like a http server or nc(1) to mimick a smtpd
server, we could just move the timeout handling to perl using, for e.g.,
alarm().  (the nc script could also be rewritten in perl since it's
simple and I don't see anything like alarm() in sh(1).)

as in:

	TIMOEUT=5
	./http-server -t $TIMEOUT -p $PORT $testroot &

then we don't even have to really check for its status nor kill it
(assuming we trust alarm() enough.)

Could this work?