Giter Club home page Giter Club logo

gdmp's Introduction

GDMP

Get Down Mr President is an easy to use signal/io filtering application for unix! It can be run in conjuction with any other command.

Usage

You can catch most unix signals sent to an application, excluding only special signals such as SIGKILL. You can find a full list of signals here.

A signal can be listened for by passing the name of the signal (excluding the sigpart):

# listen for SIGINT or ctr+c
gdmp --int my_prog --my-prog-flags/args

You can block a signal from reaching the program by passing -x after the signal name.

# Block SIGINT or ctrl+c
gdmp --int -x my_prog --my-prog-flags/args

You can write to a programs stdin when a signal is captured. This works regaurdless if the signal is blocked or not.

# Write "hello program!" to stdin on SIGINT or ctrl+c
gdmp --int -x -w "hello program!" my_prog --my-prog-flags/args

You also run a bash command when a signal is captured.

gdmp --int -w -s "echo 'hello!'" my_prog --my-prog-flags/args

Signal chaining can be used to apply modifiers to signals in bulk:

# Block SIGINT, SIGTERM, SIGHUP and write "wow!" to stdin on SIGUSR1 or SIGUSR2.
gdmp --int --term --hup -x --usr1 --usr2 -w "wow!" my_prog --my-prog-flags/args

Compiling and installing

You can download a prebuilt binary from the releases page.

To compile the program for yourself you can run:

git clone https://github.com/MrNavaStar/GDMP.git
sudo make install

The program is a signal binary and will be installed to /usr/local/bin. The make file also provides make uninstall to remove the program for you.

gdmp's People

Contributors

mrnavastar avatar

Watchers

 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.