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

Problems while running on windows (Unknown signal: SIGUSR2) #14

Closed
GiladShoham opened this issue Dec 8, 2016 · 3 comments
Closed

Problems while running on windows (Unknown signal: SIGUSR2) #14

GiladShoham opened this issue Dec 8, 2016 · 3 comments

Comments

@GiladShoham
Copy link
Contributor

Hi,
I have a problem when running on windows, this code:

if (__DEV__) {
      compiler.watch({}, reporter);

      compiler.plugin('done', () => {
        const { output } = serverConfig;
        startBackend = true;
        if (server) {
          server.kill('SIGUSR2');
        } else {
          runServer(path.join(output.path, output.filename));
        }
      });
    }

and specificlly this line:

server.kill('SIGUSR2');

Are failing due to error:
Unknown signal: SIGUSR2

Have you tried to run it on windows?
Do you have any idea how to solve this?

Thanks,
Gilad.

@GiladShoham GiladShoham changed the title Problems while running on windows Problems while running on windows (Unknown signal: SIGUSR2) Dec 8, 2016
@larixer
Copy link
Member

larixer commented Dec 8, 2016

Yeah, it's weird. Webpack is using SIGUSR2 for hot code replacement on signal. SIGUSR2 seems to be not available on Windows.

The alternative is to comment out this line and change webpack/hot/signal.js entry point to webpack/hot/poll?1000. It should work on Windows.

@GiladShoham
Copy link
Contributor Author

Thanks for the help,
I have also found out that change SIGUSR2 to SIGINT make it work.
(But I still have problems with the hot reload on windows)

@larixer
Copy link
Member

larixer commented Dec 26, 2016

If you are sending SIGINT, I believe the Node.js process will be simply terminated and according to the logic of webpack.run.js it will be restarted immediately after termination. Though this might work for you - it is not hot reload, it is just restart of backend process on source code modification.

@larixer larixer closed this as completed in d9fe070 Jan 3, 2017
tsione pushed a commit that referenced this issue Nov 20, 2018
An experimental approach based on actors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants