QP_ipc_create_servant()
     int QP_ipc_create_servant(host, QP_save_state, QP_outfile)
         char *host, *QP_save_state, *QP_outfile;
     

host is the name of the machine on which the Prolog servant is to run. If host is the string "local", then the servant is run on the same machine as the master. If host is the empty string "", the servant is run on the local machine but pipes are used for the interprocess communication rather than sockets, which are used otherwise.

QP_save_state is the name of a file containing a Prolog saved state that was created by save_ipc_servant/1. This saved state must contain the definitions of the predicates to be called and the external/3 facts that specify the interface. If QP_save_state is not an absolute filename, it will be sought, on the specified machine, in the sequence of directories specified by your PATH environment variable. If this search fails, the current working directory will be tried, if it exists on that machine.

QP_outfile is the name of the file to which to route the Prolog servant's output (stdout and stderr). If QP_outfile is the string "user", then the servant's output is routed to the C program's stdout. If it is the empty string "", the servant's stdout stream is discarded, and its stderr stream is routed to the master's stderr.

This routine returns the file descriptor of the connecting socket if the connection was made successfully and -1 if not. This routine starts the Prolog servant and may take several seconds to complete.