Opens the services database file. Format #include <netdb.h> void setservent (int stay_open);
1 – Argument
stay_open Specifies a value used to indicate when to close the services database file (TCPIP$ETC:SERVICES.DAT): o A value of 0 closes the services database file after each call to the setservent() function. o A nonzero value keeps the services database file open after each call to setservent().
2 – Description
This function opens the services database file and resets the file marker to the beginning of the file. Passing a nonzero stay_open argument keeps the connection open until you call the endservent() function or the exit() function. Related Functions See also endservent(), exit(), and getservent().