Subject: bug#63620: 30.0.50; [Feature Request] run hooks on sleep/wake

From: Ship Mints <[email-masked]>
Date: Fri, 7 Feb 2025 07:32:48 -0500

On Fri, Feb 7, 2025 at 7:18 AM Eli Zaretskii <[email-masked]> wrote:

> > Date: Fri, 7 Feb 2025 19:43:32 +0800 (GMT+08:00)
> > From: Andrew Cohen <[email-masked]>
> > Cc: [email-masked], Stefan Monnier <[email-masked]>,
> >       Eli Zaretskii <[email-masked]>, [email-masked]
> >
> > Can I get any feedback about the file descriptor closure issue? From
> what
> > I can tell without exposing it in lisp the way I did I won't be able to
> > use blocking anyway.
>
> But since there could be only one such descriptor at any given time,
> why would any Lisp program need to know its value?  It sounds like we
> need to record the descriptor internally, and then close it in C, no?
> Maybe some D-Bus related primitive could do that?
>

This is why I suggested that the lower-level C code return opaque cookies
that can be used to send back to lower-level code to operate on them, such
as closing an fd.