Giter VIP home page Giter VIP logo

daemon's Introduction

This is a really simple Java library for starting, stopping, and controlling daemon processes written in Java on Unix/Linux. To allow your program to run as a daemon, just link this library into your program. The library does not use native code, nor does it require external shell scripts. All OS-dependent functionality is implemented by executing subprocesses, specifically sh, ps, and mkfifo.

The intended use is to make it easy to build deployable jar files for server or other long-running applications. For example, you might use this library as part of packaging your Java web application into a single jar file (using embedded Jetty): this library allows the application to run as a background process, handle runtime configuration commands, and to shut itself down cleanly. Once everything is set up you can then do cool things like the following:

# Start the application in the background
java -jar myApp.jar start

# Send a command (purgecache) to the running application
# (note that this is just an example: handling non-built-in
# commands is done by logic in your application)
java -jar myApp.jar purgecache

# Start (or restart) the application if it is not
# currently running (or has crashed)
java -jar myApp.jar poke

# Shut down the running application
java -jar myApp.jar shutdown

Detailed information can be found at the wiki.

The library is open source distributed under the MIT license.

David Hovemeyer [email protected]

daemon's People

Contributors

daveho avatar nkanagar avatar

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.