CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes45downloads
README.md48 linesDownload Raw Back to siginfo
1# `siginfo`2 3[![Build Status](https://travis-ci.org/emilbayes/siginfo.svg?branch=master)](https://travis-ci.org/eemilbayes/siginfo)4 5> Utility module to print pretty messages on SIGINFO/SIGUSR16 7`SIGINFO` on BSD / macOS and `SIGUSR1` on Linux, usually triggered by8`Ctrl + T`, are by convention used to print information about9a long running process internal state. Eg. `dd` will tell you how many blocks it10has written and at what speed, while `xz` will tell you progress, compression11ratio and estimated time remaining.12 13This module wraps both signals, checks if the process is connected to TTY and14lets you do whatever you want.15 16## Usage17 18```js19var siginfo = require('siginfo')20var pkg = require('./package.json')21 22siginfo(function () {23  console.dir({24    version: pkg.version,25    uptime: process.uptime()26  })27})28 29```30 31## API32 33### `var removeListener = siginfo(queryFn, [force])`34 35`queryFn` can be used for whatever you want (logging, sending a UDP message, etc.).36Setting `force = true` will attach the event handlers whether a TTY is present37or not.38 39## Install40 41```sh42npm install siginfo43```44 45## License46 47[ISC](LICENSE)48 
basant307/AI_Governance_Project · CoolFace