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=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 20841 invoked from network); 13 Mar 2023 03:10:07 -0000 Received: from minnie.tuhs.org (2600:3c01:e000:146::1) by inbox.vuxu.org with ESMTPUTF8; 13 Mar 2023 03:10:07 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 54D24415B9; Mon, 13 Mar 2023 13:10:01 +1000 (AEST) Received: from nsstlmta24p.bpe.bigpond.com (nsstlmta24p.bpe.bigpond.com [203.38.21.24]) by minnie.tuhs.org (Postfix) with ESMTPS id 3CB0341579 for ; Mon, 13 Mar 2023 13:09:50 +1000 (AEST) Received: from smtp.telstra.com ([10.10.24.4]) by nsstlfep24p-svc.bpe.nexus.telstra.com.au with ESMTP id <20230313030948.DTOG2454.nsstlfep24p-svc.bpe.nexus.telstra.com.au@smtp.telstra.com> for ; Mon, 13 Mar 2023 14:09:48 +1100 X-RG-Spam: Unknown X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvfedgheefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuuffpveftpgfvgffnuffvtfetpdfqfgfvnecuuegrihhlohhuthemucegtddtnecunecujfgurhepfffhrhfvufgjkfhffgggtgesthdttddttdervdenucfhrhhomhepffgrvhgvucfjohhrshhfrghllhcuoegurghvvgeshhhorhhsfhgrlhhlrdhorhhgqeenucggtffrrghtthgvrhhnpeffgfffgffgveehgfeuffejheeigeekhfdtgeeivefhveeftdfftdefhfegfeefjeenucfkphepuddutddrudeguddrudelfedrvdeffeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopegrnhgvuhhrihhnrdhhohhrshhfrghllhdrohhrghdpihhnvghtpeduuddtrddugedurdduleefrddvfeefpdhmrghilhhfrhhomhepuggrvhgvsehhohhrshhfrghllhdrohhrghdpnhgspghrtghpthhtohepuddprhgtphhtthhopehtuhhhshesthhuhhhsrdhorhhgpdhrvghvkffrpegtphgvqdduuddtqddugeduqdduleefqddvfeefrdhnshifrdgrshhprdhtvghlshhtrhgrrdhnvghtpdhgvghokffrpeetfgdpoffvtefjohhsthepnhhsshhtlhhrghduudhpqdhsvhgt X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean X-RG-VS-CLASS: clean Received: from aneurin.horsfall.org (110.141.193.233) by smtp.telstra.com (5.8.812) id 6392A87C11E2FD98 for tuhs@tuhs.org; Mon, 13 Mar 2023 14:09:48 +1100 Received: from aneurin.horsfall.org (localhost [127.0.0.1]) by aneurin.horsfall.org (8.15.2/8.15.2) with ESMTP id 32D39lAR072029 for ; Mon, 13 Mar 2023 14:09:47 +1100 (EST) (envelope-from dave@horsfall.org) Received: from localhost (dave@localhost) by aneurin.horsfall.org (8.15.2/8.15.2/Submit) with ESMTP id 32D39lPU072026 for ; Mon, 13 Mar 2023 14:09:47 +1100 (EST) (envelope-from dave@horsfall.org) X-Authentication-Warning: aneurin.horsfall.org: dave owned process doing -bs Date: Mon, 13 Mar 2023 14:09:47 +1100 (EST) From: Dave Horsfall To: The Eunuchs Hysterical Society In-Reply-To: <20230312222738.bX8Mi%steffen@sdaoden.eu> Message-ID: References: <20230309230130.q4I-f%steffen@sdaoden.eu> <20230310165552.czZmL%steffen@sdaoden.eu> <20230312222738.bX8Mi%steffen@sdaoden.eu> User-Agent: Alpine 2.21.9999 (BSF 287 2018-06-16) X-GPG-Public-Key: http://www.horsfall.org/gpgkey.pub X-GPG-Fingerprint: 05B4 FFBC 0218 B438 66E0 587B EF46 7357 EF5E F58B X-Home-Page: http://www.horsfall.org/ X-Witty-Saying: "chmod 666 the_mode_of_the_beast" MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Message-ID-Hash: ZDQ4J6M2UZE67H2OWPL4LS36EN3XNLLK X-Message-ID-Hash: ZDQ4J6M2UZE67H2OWPL4LS36EN3XNLLK X-MailFrom: dave@horsfall.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.6b1 Precedence: list Reply-To: Computer Old Farts Followers Subject: [TUHS] Re: I can't drive 55: "GOTO considered harmful" 55thanniversary List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: [ Followups to COFF, as this is rapidly becoming a Unix tutorial ] On Sun, 12 Mar 2023, Warner Losh wrote: > > How often would you call setjmp()/longjmp()? > > Cheap enough for occasional error handling, way too expensive for a > generic exception handling system... processors with lots of registers > were more of a problem... I've only ever used it when knee-deep in procedure calls, and I needed to parachute back to the main loop when things went pear-shaped[*]; failure was not an option :-) On Sun, 12 Mar 2023, Steffen Nurpmeso wrote: > |> How often would you call setjmp()/longjmp() > > Only on a Sunday! Sometimes I did my best work outside of M-F 9-5 :-) > I never used these myself of free will. > > (And never regulary at all until i took maintainership of a BSD Mail > clone, which is the examplary piece of software to show that BSD signal > handling and SA_RESTART are a terrible misconception, especially as soon > as the software gets larger. .. In my opinion. Once it was able to run > "24/6" i counted the number of system calls necessary for signal block / > release and installation / removal over a week, and i think the number > was way in the six digits. System calls them all! I should have taken > the OpenBSD variant instead, and simply take over what "was good", and > it would be much, much better by now. They did the work and reduced the > very messy part to two exactly locatable system call points of interest. > (I looked i guess 2014-<2017.) A very bad decision. But if i live long > enough i will make it, and another one i would really long for.) I've never liked the concept of signals, especially for IPC; it's akin to being hit over the head with a lump of 4x2. Hardware interrupts were one thing, but it seemed to be a bit brutal in software. And no, I don't have an elegant solution short of message-passing. Heck, I still have nightmares about BSDi's "fdump" program using signals to coordinate its various children, and completely screwing up my backups as a result... > Even on a x86(-32) i have gnashed with my teeth. And that with > a Cyrix from 1996 .. and not to think about i386 or even earlier > processors with so few memory and speed. > I remember _for sure_ looking at the jmpbuf structure by then, and > the assembler files (sheer magic by then) and x86 instructions. You can read X86 assembler? I can only do that after a few stiff drinks... I did buy the book (in order to debug a floating bug defect in the optimiser -- hey, let's optimise this instruction right out! -- and I've never trusted optimisers since). [*] Cue the saying about it being impossible to design a foolproof system. -- Dave, the iconoclast