[DEVOPS-143] Node 12, needs a callback for asynchronous file writes, so switching to synchronous file writes instead
parent
950ae8818b
commit
341aeb6a08
|
@ -83,7 +83,7 @@ function _resolvePath( conf_path: string, path: string ): string
|
|||
*/
|
||||
function writePidFile( pid_path: string ): void
|
||||
{
|
||||
fs.writeFile( pid_path, process.pid );
|
||||
fs.writeFileSync( pid_path, process.pid );
|
||||
|
||||
process.on( 'exit', () => fs.unlink( pid_path ) );
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ module.exports = Class( 'Log',
|
|||
if ( this._fd !== null )
|
||||
{
|
||||
var buffer = new Buffer( sprintf.apply( this, args ) + "\n" );
|
||||
fs.write( this._fd, buffer, 0, buffer.length, null );
|
||||
fs.writeSync( this._fd, buffer, 0, buffer.length, null );
|
||||
}
|
||||
|
||||
return this;
|
||||
|
|
Loading…
Reference in New Issue