Socket
Book a DemoInstallSign in
Socket

process-trace

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

process-trace

Provides tracing process for signals

0.1.3
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

node-ptrace

Enables to trace a process, get and send signals for the traced process.

Instructions to compile:

gcc -shared -fpic src/childtrace.c  -o libchildtrace.so 

node lib/childtrace.js <process id> <number of retries>

Interfaces:

add: Takes process pid and number of retries to attach to this process
detach: Takes process pid and number of retries to detach from this process
getsignal: Takes a process pid and runs infinitely to get the traced process signals.
setsignal: Sends a signal to a given process by pid.

Sample Output:

 rchunduru@rchunduru-develop:~$ ps -aef |grep server
 1000     26725 26313 99 18:57 pts/5    00:00:03 ./server


 node examples/childtrace.js 26725 5

 rchunduru@rchunduru-develop:~$ kill -SIGHUP 26725

 arguments are  26725 5
 Starting to attach to the process and monitor it
 start with pid 26725 retries 5
 successfully attached to the process
 Got signal  stopped by signal 1

 Detach from the process
 successfully detached from process
 Signalled the process.

FAQs

Package last updated on 28 May 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.