Having acquired credentials for the service,gss-server checks to see whether the user has specifiedinetd. The main function checks forinetd as follows:
if (do_inetd) { close(1); close(2);
If the user has specified to useinetd, then theprogram closes the standard output and standard error.gss-server thencallssign_server() on the standard input, whichinetd uses to pass connections. Otherwise,gss-server createsa socket, accepts the connection for that socket with the TCP functionaccept(), and callssign_server() on the filedescriptor that is returned byaccept().
Ifinetd is not used, the program creates connectionsand contexts until the program is terminated. However, if the user has specifiedthe–once option, the loop terminates after the first connection.