addon-sdk/source/lib/sdk/system/process.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/addon-sdk/source/lib/sdk/system/process.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,62 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +"use strict";
     1.9 +
    1.10 +module.metadata = {
    1.11 +  "stability": "unstable"
    1.12 +};
    1.13 +
    1.14 +const {
    1.15 +  exit, version, stdout, stderr, platform, architecture
    1.16 +} = require("../system");
    1.17 +
    1.18 +/**
    1.19 + * Supported
    1.20 + */
    1.21 +
    1.22 +exports.stdout = stdout;
    1.23 +exports.stderr = stderr;
    1.24 +exports.version = version;
    1.25 +exports.versions = {};
    1.26 +exports.config = {};
    1.27 +exports.arch = architecture;
    1.28 +exports.platform = platform;
    1.29 +exports.exit = exit;
    1.30 +
    1.31 +/**
    1.32 + * Partial support
    1.33 + */
    1.34 +
    1.35 +// An alias to `setTimeout(fn, 0)`, which isn't the same as node's `nextTick`,
    1.36 +// but atleast ensures it'll occur asynchronously
    1.37 +exports.nextTick = (callback) => setTimeout(callback, 0);
    1.38 +
    1.39 +/**
    1.40 + * Unsupported
    1.41 + */
    1.42 +
    1.43 +exports.maxTickDepth = 1000;
    1.44 +exports.pid = 0;
    1.45 +exports.title = "";
    1.46 +exports.stdin = {};
    1.47 +exports.argv = [];
    1.48 +exports.execPath = "";
    1.49 +exports.execArgv = [];
    1.50 +exports.abort = function () {};
    1.51 +exports.chdir = function () {};
    1.52 +exports.cwd = function () {};
    1.53 +exports.env = {};
    1.54 +exports.getgid = function () {};
    1.55 +exports.setgid = function () {};
    1.56 +exports.getuid = function () {};
    1.57 +exports.setuid = function () {};
    1.58 +exports.getgroups = function () {};
    1.59 +exports.setgroups = function () {};
    1.60 +exports.initgroups = function () {};
    1.61 +exports.kill = function () {};
    1.62 +exports.memoryUsage = function () {};
    1.63 +exports.umask = function () {};
    1.64 +exports.uptime = function () {};
    1.65 +exports.hrtime = function () {};

mercurial