Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"lpstat -a" @ AIX endless loop #773

Closed
StefCoene opened this issue Aug 17, 2023 · 3 comments
Closed

"lpstat -a" @ AIX endless loop #773

StefCoene opened this issue Aug 17, 2023 · 3 comments
Labels
bug Something isn't working priority-medium
Milestone

Comments

@StefCoene
Copy link

StefCoene commented Aug 17, 2023

AIX requires a patch so lpstat -a does not hang for 15 minutes.
After 15 minutes, the command completes as expected.

This patch is also needed for the master version.

See also https://www3.software.ibm.com/aix/freeSoftware/aixtoolbox/PATCHES/cups-2.0.2-aix.patch
I moved the patch higher up in the file:

diff --git a/cups/request.c b/cups/request.c
index 66c803a04..059920e49 100644
--- a/cups/request.c
+++ b/cups/request.c
@@ -29,6 +29,10 @@
 #  define MSG_DONTWAIT 0
 #endif /* !MSG_DONTWAIT */
 
+#ifdef _AIX
+#define MSG_DONTWAIT MSG_NONBLOCK
+#endif
+

Stef

@michaelrsweet
Copy link
Member

I think it might be better for the code to read as follows:

#ifdef _AIX
#  define MSG_DONTWAIT MSG_NONBLOCK
#elif !defined(MSG_DONTWAIT)
#  define MSG_DONTWAIT 0
#endif /* _AIX */

@StefCoene
Copy link
Author

Indeed, I got some warnings during compile time.
@michaelrsweet patch is better.

@zdohnal zdohnal added bug Something isn't working priority-medium labels Sep 13, 2023
@zdohnal zdohnal added this to the v2.4.x milestone Sep 13, 2023
@zdohnal
Copy link
Member

zdohnal commented Sep 13, 2023

@michaelrsweet I'll apply combination of the @StefCoene patch and your proposal directly to master - I take your comment as review.

zdohnal added a commit that referenced this issue Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-medium
Projects
None yet
Development

No branches or pull requests

3 participants