New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

node-priority

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-priority

exposes the getpriority and setpriority system calls for adjusting priority

Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
6
-14.29%
Maintainers
1
Weekly downloads
 
Created
Source

node-priority

Build Status

This package provides access to the getpriority(2) and setpriority(2) system calls available on OSX, Linux and other UNIX variants. This can be used, for example, to implement the UNIX nice(1) utility.

Usage

var priority = require('node-priority');
var getpriority = priority.get;
var setpriority = priority.set;

setpriority(priority.Process, 0, 10, function(err) {
    if (err)
        throw err;
    getpriority(priority.Process, 0, function(err, prio) {
        console.log('successfully set priority to ' + prio);
    });
});

setpriority(function(err, rfd, wfd) {
    if (err) {
        console.log('pipe failed, maybe out of FDs? ' + err);
        return;
    }
});

Keywords

setpriority

FAQs

Package last updated on 22 Oct 2015

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