Closed kadler closed 1 year ago
Good catch. But it won’t work if the system misses the poll function. Probably a conditional compilation is needed here.
On Wed, 20 Jul 2022 at 20:04, Kevin Adler @.***> wrote:
IN and OUT are used by PollVec mask functions to determine which fd_sets to use in AddFD, FDReady, and FDSetNotReady, however these enums are not used outside of PollVec code and the rest of the code uses POLLIN and POLLOUT definitions instead. This works on many POSIX platforms since the enum values match the POLLIN and POLLOUT values, but not on AIX where POLLOUT is 2 instead of 4. This prevents code from determining when a file descriptor is writeable, leading to a hang when using FTPS protocol (at least).
Fixes #672 https://github.com/lavv17/lftp/issues/672
You can view, comment on, or merge this pull request online at:
https://github.com/lavv17/lftp/pull/673 Commit Summary
- af13c56 https://github.com/lavv17/lftp/pull/673/commits/af13c56aebcca77bc6ff95af1dc5c0bdc1d189b8 Ensure that PollVec enum matches poll values
File Changes
(1 file https://github.com/lavv17/lftp/pull/673/files)
- M src/PollVec.h https://github.com/lavv17/lftp/pull/673/files#diff-7cba41ac5f83b77e482a28ccbdeae7d67f519fe74f5c09be3598566f5e25c395 (4)
Patch Links:
— Reply to this email directly, view it on GitHub https://github.com/lavv17/lftp/pull/673, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHLWXG7DRXTEQ7KBNUFDWDVVAWSHANCNFSM54ENUIDA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- Alexander.
Well, I think then the rest of the code which uses POLLIN/POLLOUT indiscriminately is the problem then. If you want to support systems without poll (and presumably without POLLIN/POLLOUT definitions), then that code will have to be modified. Are such systems supported today? (I don't have access to such a system)
IN and OUT are used by PollVec mask functions to determine which fd_sets to use in AddFD, FDReady, and FDSetNotReady, however these enums are not used outside of PollVec code and the rest of the code uses POLLIN and POLLOUT definitions instead. This works on many POSIX platforms since the enum values match the POLLIN and POLLOUT values, but not on AIX where POLLOUT is 2 instead of 4. This prevents code from determining when a file descriptor is writeable, leading to a hang when using FTPS protocol (at least).
Fixes #672