获取 ppid
node v7.x 居然不支持 process.ppid（v6.x 支持）

@returns {Promise<number>} ppid
 /* istanbul ignore next
771976
function getPPID () {
  const ppid = process.ppid

  if (typeof ppid === 'number') {
    return Promise.resolve(ppid)
  }

  return find('pid', process.pid)
    .then(list => {
      return list && list[0] && list[0].ppid
    })
}
172460
function(pre) {
        var id =  this.Env._guidp + (++this.Env._uidx);
        return (pre) ? (pre + id) : id;
    }
854711
private long getProcessInstanceId(String instanceId) throws NumberFormatException {
        int endIndx = instanceId.indexOf("/");

        if (endIndx > -1) {
            return Long.parseLong(instanceId.substring(0, endIndx));
        }

        return Long.parseLong(instanceId);

    }
869001
function getPenId() {
	var url = getParsedUrl();
	var splitPath = url.path.split('/');
	var id = splitPath[splitPath.length - 1];
	return id;
}
868481
function getNodeFromId(nodeId){
    var res = $.grep(gAllNodes, function(e) {
        return e._id === nodeId;
    });
    return res[0];
}
1305300
function assertNode6PublishingPrerequisite() {
    return node.getNodeInfos().then((nodeInfos) => {
        if (nodeInfos.isAtLeastNode6 && nodeInfos.isSafeNpm) {
            return Promise.resolve();
        }
        throw new Error(
            `npm@${
                nodeInfos.npmVersion
            } has known issues publishing when running Node.js 6. Please upgrade npm or downgrade Node and publish again. See: https://github.com/npm/npm/issues/5082`
        );
    });
}
243222
public long getId()
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getId");
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "getId", ""+messageProcessorId);
      return messageProcessorId;
   }
413366
function (packageid) {
    return this.get('/packagedetails', {
      'cc': this.options.country,
      'l': this.options.language,
      'packageids': packageid
    }).then(function (body) {
      var data = body[packageid].data;
      return Promise.resolve(data);
    });
  }
405784
public static String getNpmArtifactId(String name, String version) {
        return MessageFormat.format(NPM_PACKAGE_FORMAT, name, version);
    }
1202181
public static String getProcess(Long pipelineId, String processNode) {
        // 根据channelId , pipelineId构造path
        return MessageFormat.format(ArbitrateConstants.NODE_PROCESS_FORMAT, getChannelId(pipelineId),
                                    String.valueOf(pipelineId), processNode);
    }
1140259
function ObiCallerID() {
    this.fromRegex = /^INVITE[\S\s]*From:\s*"?([\w\s\.\+\?\$]*?)"?<sip:((.*)@)?(.*)>;.*/;
    this.cidRegex = /<7> \[SLIC\] CID to deliver: '([\w\s\.\+\?\$]*?)' (\d*).*/;
    this.cnams = {};
    this.lastSentTime = new Date();
    this.outlookImported = false;
    this.addressbookImported = false;
    this.lastGrowlName = "";
    this.lastGrowlNumber = "";
}
839132
public function getPidByPpid($ppid)
    {
        $commandsDto = new CommandsExecutionDto();
        $commandsDto->setCommandName(CommandsConstants::GET_PID_BY_PPID);
        $commandsDto->setPid($ppid);

        return $this->getCommandExecutionResult($commandsDto);
    }
22863
public int getStartingID()
    {
        int iStartingID = 1;   // (default)
        if (this.getProperty(STARTING_ID) != null)
        {
            try {
                iStartingID = Integer.parseInt(this.getProperty(STARTING_ID));
            } catch (NumberFormatException e) {
                iStartingID = 1;
            }
        }
        return iStartingID;
    }
181259
public int getNumberOfBytesRequiredToSpend(@Nullable ECKey pubKey, @Nullable Script redeemScript) {
        if (ScriptPattern.isP2SH(this)) {
            // scriptSig: <sig> [sig] [sig...] <redeemscript>
            checkArgument(redeemScript != null, "P2SH script requires redeemScript to be spent");
            return redeemScript.getNumberOfSignaturesRequiredToSpend() * SIG_SIZE + redeemScript.getProgram().length;
        } else if (ScriptPattern.isSentToMultisig(this)) {
            // scriptSig: OP_0 <sig> [sig] [sig...]
            return getNumberOfSignaturesRequiredToSpend() * SIG_SIZE + 1;
        } else if (ScriptPattern.isP2PK(this)) {
            // scriptSig: <sig>
            return SIG_SIZE;
        } else if (ScriptPattern.isP2PKH(this)) {
            // scriptSig: <sig> <pubkey>
            int uncompressedPubKeySize = 65; // very conservative
            return SIG_SIZE + (pubKey != null ? pubKey.getPubKey().length : uncompressedPubKeySize);
        } else if (ScriptPattern.isP2WPKH(this)) {
            // scriptSig is empty
            // witness: <sig> <pubKey>
            int compressedPubKeySize = 33;
            return SIG_SIZE + (pubKey != null ? pubKey.getPubKey().length : compressedPubKeySize);
        } else {
            throw new IllegalStateException("Unsupported script type");
        }
    }
444276
function resolveId(details, filepath) {
  let id = '';

  if ('string' == typeof filepath) {
    // Only version if more than one package
    const version = details.id.includes(versionDelimiter) ? versionDelimiter + details.version : '';
    const versioned = (id, stripExtension) => {
      // Strip extension
      if (stripExtension) id = id.replace(path.extname(id), '');
      return (process.platform == 'win32' ? id.replace(/\\/g, '/') : id) + version;
    };

    // Resolve aliases
    id = alias.resolve(filepath, details.aliases);
    // Ignore disabled (false)
    id = id || filepath;
    // Return if resolved id
    if (!isFilepath(id)) return versioned(id, false);
    // Resolve alias to id (also handles main => id)
    id = alias.resolveReverse(id, details.aliases);
    // Return if resolved id
    if (!isFilepath(id)) return versioned(id, false);

    // Resolve ids from project root if nested project package
    const pkgpath = details.isNestedProjectPackage
      ? process.cwd()
      : // Resolve ids from node_modules root if npm package
        details.isNpmPackage ? details.dirname : details.pkgpath;

    [...details.paths, pkgpath].some(sourcepath => {
      if (filepath.includes(sourcepath)) {
        id = path.relative(sourcepath, filepath);
        return true;
      }
    });

    return versioned(id, true);
  }

  return id;
}
744564
public String getProcessInstanceId() {
    Execution execution = associationManager.getExecution();
    return execution != null ? execution.getProcessInstanceId() : null;
  }
66394
public static String getProcessNode(Long processId) {
        return StringUtils.leftPad(String.valueOf(processId.intValue()), 10, '0');
    }