Skip to content

Comments

Better signals interface#10401

Merged
edolstra merged 1 commit intoNixOS:masterfrom
nix-windows:better-signals-interface
Apr 5, 2024
Merged

Better signals interface#10401
edolstra merged 1 commit intoNixOS:masterfrom
nix-windows:better-signals-interface

Conversation

@Ericson2314
Copy link
Member

Motivation

This avoids some CPP and accidentally using Unix stuff in client code.

Context

Priorities and Process

Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@github-actions github-actions bot added repl The Read Eval Print Loop, "nix repl" command and debugger fetching Networking with the outside (non-Nix) world, input locking labels Apr 4, 2024
@Ericson2314 Ericson2314 mentioned this pull request Apr 4, 2024
8 tasks
@Ericson2314 Ericson2314 force-pushed the better-signals-interface branch from 1a1448b to 2edc3c9 Compare April 4, 2024 22:50
* some extra Unix-only interfaces.
*
* (The only reason everything about signals isn't Unix-only is some
* no-op definitions are provided on Windows to avoid excess CPP in
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not present in this PR, that's coming later?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appreciate the comment notes on this. Looks good.

This avoids some CPP and accidentally using Unix stuff in client code.
@Ericson2314 Ericson2314 force-pushed the better-signals-interface branch from 2edc3c9 to 50f621b Compare April 5, 2024 05:38
@edolstra edolstra merged commit 75fd09b into NixOS:master Apr 5, 2024
/**
* @note Does nothing on Windows
*/
static inline void setInterruptCheck(std::function<bool()> interruptCheck);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GCC says

In file included from src/nix-collect-garbage/nix-collect-garbage.cc:2:
src/libutil/signals.hh:27:20: warning: ‘void nix::setInterruptCheck(std::function<bool()>)’ declared ‘static’ but never defined [-Wunused-function]
   27 | static inline void setInterruptCheck(std::function<bool()> interruptCheck);
      |                    ^~~~~~~~~~~~~~~~~

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in #10411.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, sorry about that!

@Ericson2314 Ericson2314 deleted the better-signals-interface branch April 5, 2024 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fetching Networking with the outside (non-Nix) world, input locking repl The Read Eval Print Loop, "nix repl" command and debugger

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants