lucid

Crates.iolucid
lib.rslucid
version0.3.0
sourcesrc
created_at2018-09-12 21:52:04.208571
updated_at2018-09-13 19:44:02.447805
descriptionA mock-application for programs that spawn subprocesses.
homepagehttps://github.com/sharkdp/lucid
repositoryhttps://github.com/sharkdp/lucid
max_upload_size
id84454
size209,610
David Peter (sharkdp)

documentation

README

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

cargo install lucid
Commit count: 86

cargo fmt