Git Product home page Git Product logo

jetpack-subprocess's Introduction

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) ,
Ramalingam Saravanan (from enigmail team)

jetpack-subprocess's People

Contributors

ochameau avatar mykmelez avatar gozala avatar jsantell avatar

Stargazers

Mikal avatar Alexander Salas Bastidas avatar Val Packett avatar Matías Agustín Méndez avatar  avatar J. Ryan Stinnett avatar easyMaxi avatar  avatar  avatar Mike de Boer avatar Jeff Griffiths avatar Lloyd Hilaiel avatar  avatar

Watchers

 avatar  avatar

jetpack-subprocess's Issues

Get echo example working

Besides the API changes from that shown on the main page, I see the code now expects an executable file. Any way to get this to work again with commands like echo, etc.?

Readme example is out of date

To get this to work I had to remove references to submodule.ReadablePipe/WriteablePipe/Terminate and use done: function () { ... } in call.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.