nyxt icon indicating copy to clipboard operation
nyxt copied to clipboard

Which parameters for (uiop:quit CODE FINISH-OUTPUT)?

Open Ambrevar opened this issue 2 years ago • 1 comments

In commit 0b1f8244d02d64322cdc45dd8b64ecb217bcbaff @jmercouris added this line to quit Nyxt:

(uiop:quit 0 nil)

On SBCL uiop:quit calls to sb-ext:exit. Excerpt from the docstring:

    When ABORT is false (the default), current thread is first unwound,
    *EXIT-HOOKS* are run, other threads are terminated, and standard
    output streams are flushed before SBCL calls exit(3) -- at which point
    atexit(3) functions will run. If multiple threads call EXIT with ABORT
    being false, the first one to call it will complete the protocol.

So the different between T and NIL in uiop:quit here is whether sb-ext:*exit-hooks* are run or not, respectively.

Thoughts?

Ambrevar avatar Jun 14 '22 15:06 Ambrevar

Looks like the hooks should run to make sure there is no buffered data lost, like a write to a file somewhere. TL;DR clean exit, (uiop:quit 0 nil) being the proper way?

CorruptedVor avatar Jun 23 '22 12:06 CorruptedVor

Well then, seems the code is correct :-)

jmercouris avatar Nov 08 '23 06:11 jmercouris