lib/src/BoxTools/VisItPythonConnection.cpp
// ****************************************************************************
//  Method:  Close
//
//  Purpose:
//    Close the connection to the CLI.  Also closes file descriptors, which
//    should tell VisIt's Python interface to exit.
//
//  Programmer:  Jeremy Meredith
//  Creation:    June 12, 2007
//
// ****************************************************************************
Close
Purpose:
Close the connection to the CLI.  Also closes file descriptors, which
should tell VisIt's Python interface to exit.

Jeremy Meredith
Creation:    June 12, 2007
Close Purpose : Close the connection to the CLI . Also closes file descriptors which should tell VisIt ' s Python interface to exit . Jeremy Meredith Creation : June 12 2007
bool VisItPythonConnection::Close()
{
    if (visitpid == -1)
    {
        error = "close failed; CLI was not launched";
        return false;
    }
    close(to_cli);
    close(from_cli);
    to_cli   = -1;
    from_cli = -1;
    visitpid = -1;
    return true;
}
bool VisItPythonConnection :: Close ( ) { if ( visitpid == -1 ) { error = " " ; return false ; } close ( to_cli ) ; close ( from_cli ) ; to_cli = -1 ; from_cli = -1 ; visitpid = -1 ; return true ; }
Method:  Close
Purpose:
Close the connection to the CLI.
Method : Close Purpose : Close the connection to the CLI .
// don't try to close if we're not open // okay, maybe flagging this as an error is excessive, but still.... // Probably unnecessary to kill and wait for the child //kill(visitpid, SIGHUP); //waitpid(visitpid, NULL, 0) << endl;