Git Product home page Git Product logo

aeternum's People

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

Watchers

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

aeternum's Issues

Doesn't compile

gcc -O2 -g -Wall -Ideps/libuv/include -framework CoreServices -o aeternum aeternum.c options.c deps/libuv/libuv.a
aeternum.c: In function ‘set_pidfile_path’:
aeternum.c:147: error: ‘WCHAR’ undeclared (first use in this function)
aeternum.c:147: error: (Each undeclared identifier is reported only once
aeternum.c:147: error: for each function it appears in.)
aeternum.c:147: error: expected ‘;’ before ‘homedir’
aeternum.c:148: warning: implicit declaration of function ‘FAILED’
aeternum.c:148: warning: implicit declaration of function ‘SHGetFolderPathW’
aeternum.c:148: error: ‘CSIDL_PROFILE’ undeclared (first use in this function)
aeternum.c:148: error: ‘path’ undeclared (first use in this function)
aeternum.c:148: error: expected ‘)’ before ‘{’ token
aeternum.c:172: error: expected expression before ‘}’ token
make: *** [aeternum] Error 1

Those appear to be some Windows constants. WTF.

Dies on second SIGUSR1 signal

aeternum behaves properly if it receives one SIGUSR1 signal, but on the second attempt it kills the aeternum process and leaves its child running.

cc @mmalecki

Change to /

A daemon should change to / before it runs, at least optionally. That way it does not block an unmount that might be needed.

Use SIGTERM to terminate the child process

Using SIGKILL gives the process no chance for cleanup. I propose sending SIGTERM initially, waiting a reasonable amount of time (possibly user defined and defaulting to x) for the process to end itself, and then finally send SIGKILL if necessary. I have some potentially longer-running operations (like sending emails) in my nodejitsu processes and my app will wait and exit cleanly when sent SIGTERM, but who knows what will be finished with a SIGKILL. Unfortunately I'm not great with C, or I'd send a PR.

In node.js...

var kill = function (child) {
  var wait = 5 * 60 * 1000;
  var timeout = setTimeout(child.kill.bind(child, 'SIGKILL'), wait);
  child.on('close', clearTimeout.bind(null, timeout);
  child.kill();
};

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.