From: theinicke@bss-wf.de
To: 9front@9front.org
Subject: Re: [9front] Mail rewrite; open path with stored mails
Date: Mon, 15 Feb 2021 09:15:36 +0100 [thread overview]
Message-ID: <3722F8754191D3F8DE6B80755E5B34F4@bss-wf.de> (raw)
In-Reply-To: <4ADB69E3C2CE209A9CD6A09D402009FE@musolino.id.au>
Quoth Alex Musolino <alex@musolino.id.au>:
> > + 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");
>
atexit is only called once, because openmbox is only called once;
will move it into main right after openmbox to avoid potential future duplicate calls however, thanks.
I decided to call removeopened() if atexit fails,
because if we exit the program anyway then we may remove the mbox then and there?
next prev parent reply other threads:[~2021-02-15 8:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-12 20:54 theinicke
2021-02-12 21:10 ` ori
2021-02-13 20:47 ` theinicke
2021-02-13 21:25 ` theinicke
2021-02-13 23:59 ` Alex Musolino
2021-02-14 10:42 ` theinicke
2021-02-14 20:57 ` ori
2021-02-14 22:05 ` theinicke
2021-02-14 22:55 ` Alex Musolino
2021-02-15 8:15 ` theinicke [this message]
2021-02-15 9:56 ` theinicke
-- strict thread matches above, loose matches on Subject: below --
2021-02-12 20:50 [9front] Mail rewrite " theinicke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3722F8754191D3F8DE6B80755E5B34F4@bss-wf.de \
--to=theinicke@bss-wf.de \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).