Registry / devops / exec-queue

exec-queue

JSON →
library0.0.2jsnpmunverified

A tiny utility that limits concurrent child_process.exec calls to prevent EMFILE errors. Version 0.0.2, no active maintenance since 2014. It wraps Node.js child_process.exec with a concurrency queue (default limit 10). Unlike full-featured process managers or promise-based exec wrappers, it provides a simple drop-in replacement with zero dependencies. Useful for legacy scripts or simple batch processing where too many exec calls would exceed OS file descriptor limits.

devops
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

This library does not support ES modules or named exports; it exports a single function via CommonJS.

var exec = require('exec-queue');

The exported exec function is callback-based, not Promise-based. Do not try to .then() it.

exec('ls', function(err, stdout, stderr) { ... });

The concurrency limit is exposed as a mutable property on the exec function itself, not a method.

exec.limit = 20;

Shows basic usage of exec-queue to run 100 exec commands with a concurrency limit of 10, avoiding EMFILE errors.

var exec = require('exec-queue'); for (var i = 0; i < 100; i++) { exec('echo', ['hello'], function(err, stdout, stderr) { if (err) console.error(err); else console.log(stdout); }); }
Debug
Known footguns
deprecatedProject is unmaintained; last commit in 2014.
gotchaThe queue limit is hardcoded to 10 and not configurable via constructor.
gotchaDoes not support promises; always use callbacks.
gotchaNo TypeScript definitions or ES module support.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
9 hits · last 30 days
gptbot
3
bingbot
1
Resources