Index of Section 2 Manual Pages

Interix / SUAgetpwent.2Interix / SUA

getpwent(2)                                                 getpwent(2)

  endpwent()

  NAME

    endpwent(), getpwent(), setpwent() - access user database

  SYNOPSIS

    #include 

    void endpwent(void);
    struct passwd *getpwent(void);
    void setpwent(void);

  DESCRIPTION

    The getpwent(2) function returns a pointer to a struct passwd containing
    information from the user database for a user. Each entry in the user
    database contains a passwd structure. The first call to getpwent(2)
    returns a structure containing information from the first entry in the
    database. Each subsequent call proceeds through the database, returning a
    pointer to a structure containing information from the next line. In this
    way, getpwent(2) can be used to search the entire user database. When
    getpwent(2) reaches the end of the database or on error, it returns a null
    pointer.

    The setpwent(2) function rewinds the user database to allow repeated
    searches.

    The endpwent(2) function closes the user database when processing is
    complete.

  RETURN VALUE

    The getpwent(2) function returns a pointer to a structure on success; on
    end-of-file or on error, it returns a null pointer.

  ERRORS

    The getpwent(2), setpwent(2), and endpwent(2) functions may fail for this
    reason:

    [EIO]
        An I/O error occurred.

  USAGE NOTES

    None of these functions are thread safe.

    None of these functions are async-signal safe.


Interix / SUAHosted at SUA Community for Interix, SUA and SFUInterix / SUA