Hosts that have been indefinitely locked by assigning the value 0 to the duration parameter of ls_lockhost() can only be manually unlocked.
The following code example demonstrates how to use ls_unlockhost() to manually unlock a host:
/******************************************************* LSLIB -- Examples** ls_unlockhost()* Unlocks an indefinitely locked local host.******************************************************/#include <lsf/lsf.h>#include <stdlib.h>#include <stdio.h>int main(int argc, char ** argv){/* Checking for the correct format*/if (argc !=1){fprintf(stderr, "usage: sudo %s\n", argv[0]);exit(-1);}/* Call ls_unlockhost(). If an error occurs, print an error msg and exit.*/if (ls_unlockhost() <0){ls_perror("ls_lockhost");exit(-1);}/* Indicate a successful ls_unlockhost() call and exit.*/printf("Host is unlocked\n");exit(0);}