tasks/jasmine/phantom-jasmine-runner.js
function sendMessage( args ){
    last = new Date();
    fs.write( tmpfile, JSON.stringify( args ) + '\n', 'a' );
    // Exit when all done.
    if( /^done/.test( args[0] ) ){
        phantom.exit();
    }
}
function sendMessage( args ){
    last = new Date();
    fs.write( tmpfile, JSON.stringify( args ) + '\n', 'a' );
    // Exit when all done.
    if( /^done/.test( args[0] ) ){
        phantom.exit();
    }
}
Messages are sent to the parent by appending them to the tempfile.