頭檔案
#include <sys/types.h>
#include <pwd.h>
函式原型
void endpwent(void);
說明
endpwent()用來關閉由getpwent()所打開的密碼檔案。
The endpwent() function May be called to close the user database when processing is complete.
範例
#include <pwd.h>
#include <sys/types.h>
int main(){
struct passwd *p;
while ((p = getpwent ()) != NULL) {
}
endpwent();
}