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=0.0 required=5.0 tests=none autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 2701 invoked from network); 14 Feb 2021 23:54:58 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 14 Feb 2021 23:54:58 -0000 Received: from vultr.musolino.id.au ([45.76.123.158]) by 1ess; Sun Feb 14 17:56:05 -0500 2021 Received: from 58.170.82.66 ([58.170.82.66]) by vultr; Mon Feb 15 09:55:20 +1100 2021 Message-ID: <4ADB69E3C2CE209A9CD6A09D402009FE@musolino.id.au> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit To: 9front@9front.org From: Alex Musolino Date: Mon, 15 Feb 2021 09:25:19 +1030 In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: flexible webscale markup database table scripting frontend Subject: Re: [9front] Mail rewrite; open path with stored mails Reply-To: 9front@9front.org Precedence: bulk > + if(atexit(removeopened) == 0) { > + removeopened(); > + sysfatal("atexit: %r"); > + } This is not how atexit(2) works. The idea is that you would do atexit(removeopened) *once* in main which arranges for removeopened to be called on the way out of the program. The following should suffice: if(atexit(removeopened) == 0) sysfatal("atexit: %r");