DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Network services

Establishing a connection

To establish a connection with an REXEC server, use the rexecve call:

#include <rx.h>

int cnum; /* rexec connection number */

main() { char host[20], /* host name */ service[20], /* service name */ *rxargv[10], /* service argument vector */ *rxenvp[10]; /* service environment vector */ int flags = 0; /* service flags */ extern long Rx_errno; /* rexec error */

(void) strcpy(host, "tahoe"); (void) strcpy(service, "rx"); rxargv[0] = "ls"; rxargv[1] = "-l"; rxargv[2] = NULL; rxenvp[0] = NULL;

cnum = rexecve(host, service, rxargv, rxenvp, flags); if (cnum < 0) { rxperror(Rx_errno); exit(1); } . . . }

Upon successful completion, rexecve will allocate and return a connection number, which should be used for all subsequent calls to REXEC client routines for this connection.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004