logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

upscli_fd - Get file descriptor for connection

Description

       The upscli_fd() function takes the pointer ups to a UPSCONN_t state structure and returns the value of
       the file descriptor for that connection, if any.

       This may be useful for determining if the connection to upsd(8) has been lost.

Name

       upscli_fd - Get file descriptor for connection

Return Value

       The upscli_fd() function returns the file descriptor, which may be any non-negative number.

       It returns -1 if an error occurs.

See Also

upscli_connect(3), upscli_strerror(3), upscli_upserror(3)

Network UPS Tools 2.8.3                            07/08/2025                                       UPSCLI_FD(3)

Synopsis

               #include <upsclient.h>

               int upscli_fd(UPSCONN_t *ups);

See Also