IBM

ls_connect

Sets up an initial connection with the Remote Execution Server (RES) on a specified remote host.

This routine returns general configuration information about LSF clusters.

ls_connect sets up an initial connection with the Remote Execution Server (RES) on a specified remote host. You can then use this connection for future remote execution or control interactions. This routine is called automatically if a connection is not set up when a remote execution request is made (see ls_rexecv). The explicit invocation of this routine has performance advantages in certain cases, typically for parallel applications. The routine returns immediately when the connection is established rather than waiting for the completion of the possibly time consuming authentication and status checking process by the RES (see res()). The application can set up initial connections with many remote hosts simultaneously, overlapping the authentication processes on all remote hosts. On successful completion, this routine returns a socket descriptor through which the connection has been established. If the caller's effective uid is root, this socket has been bound to a privileged port during ls_initrex. ls_connect uses a socket created by the preceding invocation of ls_initrex and invokes connect() to connect to the specified host. If the connection fails, -1 is returned and the socket is closed.

The successful return of ls_connect does not mean that the RES has granted remote execution permission, it means that the authentication process has been initiated. If the RES does not grant remote execution permission, an error is returned in the next interaction with the RES. Calling ls_connect multiple times with the same host name does not create multiple connections; the same connection is always used.

#include <lsf/lsf.h>

int ls_connect(char *host)

Parameters:
*host The host that is set up with a Remote Execution Server.
Data Structures:
none
Define Statements:
none
Returns:
int:Returns socket descriptor through which a connection has been set up.
Function was successful.

int:-1
Function failed.

Errors:
Systems that conform to the Single UNIX specification are not required to detect error conditions for this function.
Equivalent line commands:
none
Files:
none
See also:
ls_rexecv

ls_initrex

ls_isconnected

ls_findmyconnections



     
Date Modified: 16 Jul 2014

Terms of Use
Copyright © 1994-2014 International Business Machines Corp.
US Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.