serverspy/src/serverspy.cxx
//------------------------------------------------------------------------------
// This function will start the name_server.  Returns 0 to indicate 
// failure, 1 to indicate that process was started.
//------------------------------------------------------------------------------
This function will start the name_server.  Returns 0 to indicate
failure, 1 to indicate that process was started.
This function will start the name_server . Returns 0 to indicate failure 1 to indicate that process was started .
int start_name_server() {
    char *cmd;
    char *p;
    static const char *argv[] = { NULL };
    p=getenv("PSETHOME");
    cmd = new char[(p!=NULL ? strlen(p) : 0) + 20];
    if(p!=NULL) {
        sprintf(cmd,"%s/bin/nameserv",p);
    } else {
        sprintf(cmd,"nameserv");
    }
    int result = start_process(cmd, argv) != 0;
    delete [] cmd;
    return result;
}
int start_name_server ( ) { char * cmd ; char * p ; static const char * argv [ ] = { NULL } ; p = getenv ( " " ) ; cmd = new char [ ( p != NULL ? strlen ( p ) : 0 ) + 20 ] ; if ( p != NULL ) { sprintf ( cmd , " " , p ) ; } else { sprintf ( cmd , " " ) ; } int result = start_process ( cmd , argv ) != 0 ; delete [ ] cmd ; return result ; }
This function will start the name_server.
This function will start the name_server .