Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Addon-sdk package for subprocess xpcom components from enigmail. Allow to run process, manipulate stdin/out and kill it.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 tests
Octocat-spinner-32 README.md
Octocat-spinner-32 package.json
Octocat-spinner-32 sizeof_fileaction.c
README.md

What's that?

Simply package enigmail hard work on providing IPC feature in mozilla platform. So we are able to launch child proccesses from javascript, and in our case, from addon-sdk libraries :)

Sample of code:

const subprocess = require("subprocess");
var p = subprocess.call({
  command:     'echo',

  // Print stdin and our env variable
  arguments:   ['$@', '$ENV_TEST'],
  environment: ['ENV_TEST=OK'],

  stdin: subprocess.WritablePipe(function() {
    this.write("stdin");
    this.close();
  }),
  stdout: subprocess.ReadablePipe(function(data) {
    // data should be equal to: "stdin OK"

  }),
  stderr: subprocess.ReadablePipe(function(data) {

  }),
  onFinished: subprocess.Terminate(function() {

  }),
  mergeStderr: false
});

Credits:

All enigmail team working on IPC component.
Patrick Brunschwig (author of almost all code) patrick@mozilla-enigmail.org,
Ramalingam Saravanan (from enigmail team) svn@xmlterm.org

Something went wrong with that request. Please try again.