function exec( cmd, script, clbk ) {
	var child;
	var args;
	var opts;

	debug( 'Creating child process...' );
	args = [ script ];
	opts = {
		'cwd': cwd(),
		'env': proc.env,
		'encoding': proc.env.WORKER_ENCODING,
		'maxBuffer': parseInt( proc.env.WORKER_MAX_BUFFER, 10 ),
		'timeout': 0,
		'killSignal': 'SIGTERM'
	};
	if ( proc.env.WORKER_UID ) {
		opts.uid = parseInt( proc.env.WORKER_UID, 10 );
	}
	if ( proc.env.WORKER_GID ) {
		opts.gid = parseInt( proc.env.WORKER_GID, 10 );
	}
	child = execFile( cmd, args, opts, done );

	debug( 'Child process created. pid: %d.', child.pid );
	return child;

	/**
	* Callback invoked upon child process termination.
	*
	* @private
	* @param {(Error|null)} error - error object
	* @param {(Buffer|string)} stdout - standard output
	* @param {(Buffer|string)} stderr - standard error
	* @returns {void}
	*/
	function done( error, stdout, stderr ) {
		if ( error ) {
			debug( 'Child process error: %s. pid: %d.', error.message, child.pid );
			return clbk( error );
		}
		debug( 'Child process closed. pid: %d.', child.pid );

		proc.stdout.write( stdout );
		proc.stderr.write( stderr );

		clbk( null, child.pid, script );
	}
}
Runs a script by executing the file in a child process without spawning a shell.

@private
@param {string} cmd - executable to run
@param {string} script - script filepath
@param {Callback} clbk - callback to invoke after a child process closes
@returns {Process} child process