mirror of
https://github.com/openstf/stf
synced 2025-10-04 02:09:32 +02:00
Log forks.
This commit is contained in:
parent
5e610a8de4
commit
961a958d7b
1 changed files with 5 additions and 1 deletions
|
@ -3,6 +3,8 @@ var cp = require('child_process')
|
||||||
|
|
||||||
var Promise = require('bluebird')
|
var Promise = require('bluebird')
|
||||||
|
|
||||||
|
var log = require('./logger').createLogger('util:procutil')
|
||||||
|
|
||||||
function ExitError(code) {
|
function ExitError(code) {
|
||||||
Error.call(this)
|
Error.call(this)
|
||||||
this.name = 'ExitError'
|
this.name = 'ExitError'
|
||||||
|
@ -17,7 +19,9 @@ util.inherits(ExitError, Error)
|
||||||
module.exports.ExitError = ExitError
|
module.exports.ExitError = ExitError
|
||||||
|
|
||||||
// Export
|
// Export
|
||||||
module.exports.fork = function() {
|
module.exports.fork = function(filename, args) {
|
||||||
|
log.info('Forking "%s %s"', filename, args.join(' '))
|
||||||
|
|
||||||
var resolver = Promise.defer()
|
var resolver = Promise.defer()
|
||||||
var proc = cp.fork.apply(cp, arguments)
|
var proc = cp.fork.apply(cp, arguments)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue