npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

htd

v0.0.2

Published

How to die on Unix (POSIX signals)

Downloads

13

Readme

how to die

i noticed that there is a death package in npm. however it did not really do what i wanted. i just wanted a mapping between the various signal names and their integer values. as it happens, this is not as easy as it sounds, because signals differ between ATT and BSD, as well as between e.g., SPARC and MIPS.

so while i don't personally know anybody writing javascript on IRIX, It's rude to release software that is so hardware- or kernel-centric as to ignore our fellow programmers on different Unixes.

accordingly, i wrote this package. it converts between signal names and numbers on HP, SPARC, MIPS, i386 (and by extension x64), and PowerPC/POWER. it also gives you a non-binding description of what would happen (or should happen; you can trap SIGSEGV and do nothing, if you like), and a description of what the signal actually means.

note that this is pretty cryptic and some of these signals go waaaaaay way back to when we had stone keyboards and we all used teletypes. it may not make sense in the context of, say, a modern linux.

interface

var htd = require( 'htd' );
var kill = htd.get( 9 );
var segv = htd.get( 'SIGSEGV' );
var term = htd.get( 'TERM' );

if you are one of those brave souls who is using a non-i386 platform, you may set htd.mode to one of ppc, sh, alpha, sparc, or mips. the return values from htd.get() will be appropriate to your platform/unix. no guarantees are provided in terms of children on your lawn, however.

the resultant object will have the methods numeric, action, and signal. these are not very cleverly named and do what you would expect.

if you would like ALL THE SIGNALS, htd.signals is the structure, exported. be advised it contains all the numerics. look at the source to see what is what.

license

well, this is tricky because it is cobbled together from header files from ancient unixes and probably includes verbatim words from obscure HP or Berkeley engineers. i am not certain it can be 'copyrighted' by anyone and is without question a derivative work.

this having been said, it was written by an employee of the united states government, and is not subject to copyright; it is hereby released into the public domain.

for purposes of attribution (though you really shouldn't), the author is jane arc, @janearc[email protected].🐙👾