Coder Social home page Coder Social logo

sharkdp / lucid Goto Github PK

View Code? Open in Web Editor NEW
88.0 7.0 3.0 89 KB

A simple mock-application for programs that work with child processes

License: Apache License 2.0

Rust 79.40% Shell 20.60%
command-line tool cli terminal debugging testing process-control

lucid's Introduction

lucid

Build Status

A simple mock-application that can be used by other programs that work with child processes.

lucid is similar to sleep, but has a few additional features that can be helpful when debugging applications that spawn subprocesses.

Demo

lucid demo

Introduction

Applications or scripts that handle child processes need to deal with a lot of different scenarios.

There are really simple processes that successfully terminate after a short period of time:

lucid 2

Others also finish after some time, but fail with a non-zero exit code:

lucid 3 --exit-code=1

Some processes just run forever (but can be terminated via SIGINT or SIGTERM):

lucid

Others refuse to handle termination signals properly and just ignore them:

lucid 10 --no-interrupt

There are also processes that choose to daemonize themselves immediately:

lucid 10 --daemon

Many processes print a lot on standard output:

lucid 10 --verbose

While some others might generate error messages:

lucid 10 --stderr --verbose

Usage

USAGE:
    lucid [OPTIONS] [duration]

OPTIONS:
    -c, --exit-code <CODE>    Terminate with the given exit code [default: 0]
    -d, --daemon              Daemonize the process after launching
    -I, --no-interrupt        Do not terminate when receiving SIGINT/SIGTERM signals
    -p, --prefix <PREFIX>     Prefix all messages with the given string [default: lucid]
    -v, --verbose             Be noisy
    -q, --quiet               Do not output anything
    -e, --stderr              Print all messages to stderr
    -h, --help                Prints help information
    -V, --version             Prints version information

ARGS:
    <duration>    Sleep time in seconds. If no duration is given, the process will sleep forever.

Installation

On Debian-based systems

wget "https://github.com/sharkdp/lucid/releases/download/v0.3.0/lucid_0.3.0_amd64.deb"
sudo dpkg -i lucid_0.3.0_amd64.deb

On other distrubutions

Check out the release page for binary builds.

Via cargo

cargo install lucid

lucid's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar keysym avatar sharkdp 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

icodein deep-soft

lucid's Issues

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.