Code Monkey home page Code Monkey logo

daemon.node's Introduction

daemon.node's People

Contributors

slashed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

daemon.node's Issues

Node crashes silently on disappearing ttyS0

Ok, this is a tough one, but I hope you can give me some hints. :)

I have an embedded ARM device that reserves four ttyS* devices in /dev;

~$ ls -al /dev/ttyS?
crw-rw----    1 root     dialout    4,  64 Jul  5 14:34 /dev/ttyS0
crw-rw----    1 root     dialout    4,  65 Jul  5 08:03 /dev/ttyS1
crw-rw----    1 root     dialout    4,  66 Jul  5 08:03 /dev/ttyS2
crw-rw----    1 root     dialout    4,  67 Jul  5 08:03 /dev/ttyS3

I have two different PCMCIA / CF cards that provide a serial port. Inserting one of these cards enables /dev/ttyS0.

Having the card inserted I run the following program:

require("daemon").start();
console.log("daemon mode ok");

var fs = require("fs");

setInterval(function() {
  console.log("alive.");
}, 1000);

fs.open("/dev/ttyS0", "r", 0666, function(err, fd) {
  if (err) {
    console.log("open() failed: ",err.message);
  } else {
    console.log("open() OK");
  }
});

The "alive." line is written continously until I remove the CF card. Then the Node.JS process dies silently.

Note the /dev/ttyS0 device file is there at all times. It changes it's mtime, though.

Node does not crash when the device is not open or when Node runs in foreground (not using the daemonplugin).

Do you have any idea what could be causing this? Especially, why does daemon make a difference here?

$ node -v
v0.4.8

$ uname -a
Linux nomad 2.6.26.7-sdg #15 Wed Sep 30 15:32:44 EDT 2009 armv5tel unknown

Add daemon.node to npm

daemon.node looks great, but it'd be even better if it were installable using npm: http://npmjs.org/

Having an npm package for daemon.node would make it possible for my own apps to pull it in as a dependency seamlessly without requiring the user to hunt it down and install it, which is a must for me.

Previous pid leaves trailing characters

I encountered an issue where a new pid might be shorter than the previous pid. What happens is the lock file gets written with the new PID, but there are trailing digits from the previous one, so when you try to stop the application, it fails.

I fixed this by changing the code that writes the PID to pad up to PID_MAXLEN (which is defined as 10). That way, no matter how short the pid is, it will add trailing spaces up to PID_MAXLEN characters, and there won't be any digits leftover from the previous PID.

Undefined symbol "ev_rt_now"

Original post: https://github.com/nodejitsu/haibu/issues/23

Reposting here as it's daemon.node that's having trouble...

Original Message:

I'm getting the following error when trying to run bin/haibu-server (via both npm install & git clone + npm link):

scott@scott:~$ haibu-server

node.js:183
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: /usr/local/lib/node_modules/haibu/node_modules/daemon/build/default/daemon.node: undefined symbol: ev_rt_now
at Object..node (module.js:472:11)
at Module.load (module.js:339:31)
at Function._load (module.js:298:12)
at require (module.js:367:19)
at Object. (/usr/local/lib/node_modules/haibu/node_modules/daemon/lib/daemon.js:10:15)
at Module._compile (module.js:427:26)
at Object..js (module.js:466:10)
at Module.load (module.js:339:31)
at Function._load (module.js:298:12)
at require (module.js:367:19)

  • node v0.5.0-pre
  • npm v1.0.12

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.