Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better signals interface #10401

Merged
merged 1 commit into from
Apr 5, 2024
Merged

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
* 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
Contributor

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
Contributor

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.
@edolstra edolstra merged commit 75fd09b into NixOS:master Apr 5, 2024
9 checks passed
/**
* @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