/*
 * exit
 * https://github.com/cowboy/node-exit
 *
 * Copyright (c) 2013 "Cowboy" Ben Alman
 * Licensed under the MIT license.
 */

"use strict";module.exports=function(t,n){function i(){r===n.length&&process.exit(t)}n||(n=[process.stdout,process.stderr]);var r=0;n.forEach(function(e){e.bufferSize===0?r++:e.write("","utf-8",function(){r++,i()}),e.write=function(){}}),i(),process.on("exit",function(){process.exit(t)})};