msvargas / node-logix

Node.js package to read/write data from Allen Bradley Compact/Control Logix PLC's
MIT License
13 stars 3 forks source link

Error: uv_signal_start EINVAL #1

Closed bubtheengineer closed 5 years ago

bubtheengineer commented 5 years ago

Looks like node10 throws an error when trying to catch SIGKILL/SIGSTOP. Earlier versions (<8) did not do this.

Error: uv_signal_start EINVAL at process. (internal/process/main_thread_only.js:92:15) at process.emit (events.js:198:13) at _addListener (events.js:224:14) at process.addListener (events.js:272:10) at process.once (events.js:301:8) at new PLC (/usr/local/lib/node_modules/node-logix/build/commonjs/src/PLC.js:169:21)

bubtheengineer commented 5 years ago

@punisher97 Great code btw

msvargas commented 5 years ago

Hi, only disable autoClose option, however a update code to check node version, thank you.

Currently, do you use node-logix?

       if (!!_this.autoClose) { // ignore process signals
            var onExit = function () {
                _this.close();
            };
            process.once("SIGINT", onExit);
            process.once("SIGKILL", onExit);
            process.once("beforeExit", onExit);
        }
msvargas commented 5 years ago

@punisher97 Great code btw

Thanks!

bubtheengineer commented 5 years ago

Yes, I'm using it to read some data into node-red (using an exec block right now), and push the data to emoncms for logging/notifications. I have a Micro820 running my water wells and a potable water storage tank.

On Fri, Nov 8, 2019 at 2:42 PM msvargas notifications@github.com wrote:

Hi, only disable autoClose option, however a update code to check node version, thank you.

Currently, do you use node-logix?

   if (!!_this.autoClose) { // ignore process signals
        var onExit = function () {
            _this.close();
        };
        process.once("SIGINT", onExit);
        process.once("SIGKILL", onExit);
        process.once("beforeExit", onExit);
    }

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/punisher97/node-logix/issues/1?email_source=notifications&email_token=ANW6WUCSHSJFGACZSDND6C3QSW6J7A5CNFSM4JKY2DX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDTE5DQ#issuecomment-551964302, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANW6WUHLB3CZ6ZFY6U575BDQSW6J7ANCNFSM4JKY2DXQ .

msvargas commented 5 years ago

Yes, I'm using it to read some data into node-red (using an exec block right now), and push the data to emoncms for logging/notifications. I have a Micro820 running my water wells and a potable water storage tank.

It's amazing! Thanks for sharing with me, node-logix is ​​my first open source repository :) Greetings from Colombia, I just developed the package to control a door, but I saw that it could serve someone else, like you