summaryrefslogtreecommitdiff
path: root/audio/amp/patches
diff options
context:
space:
mode:
authormycroft <mycroft>1998-03-06 02:36:32 +0000
committermycroft <mycroft>1998-03-06 02:36:32 +0000
commit1347a91837117112c65677a82e2e9b2a523fb61d (patch)
tree71343d3d9c4e66bbe66c1209f721477a44182b8c /audio/amp/patches
parent11a816ef216e83914cee80b03cc4ff25f94edcb7 (diff)
downloadpkgsrc-1347a91837117112c65677a82e2e9b2a523fb61d.tar.gz
Make sure we never leave stdin or stdout in non-blocking mode.
Diffstat (limited to 'audio/amp/patches')
-rw-r--r--audio/amp/patches/patch-ad53
1 files changed, 53 insertions, 0 deletions
diff --git a/audio/amp/patches/patch-ad b/audio/amp/patches/patch-ad
new file mode 100644
index 00000000000..3c967ea94fe
--- /dev/null
+++ b/audio/amp/patches/patch-ad
@@ -0,0 +1,53 @@
+*** guicontrol.c~ Sat Aug 23 07:30:51 1997
+--- guicontrol.c Thu Mar 5 21:31:06 1998
+***************
+*** 312,317 ****
+--- 312,325 ----
+ if (quit_flag)
+ {
+ /* fprintf(stderr, "quit_flag is true\n"); */
++
++ if((flags = fcntl(STDOUT_FILENO, F_GETFL, 0)) < 0)
++ perror("fcntl");
++ flags &= ~O_NONBLOCK;
++
++ if(fcntl(STDOUT_FILENO, F_SETFL, flags) < 0)
++ perror("fcntl");
++
+ exit(0);
+ }
+ while(GUI_FD_TO_PLAY != -1)
+***************
+*** 334,340 ****
+
+ if((flags = fcntl(STDIN_FILENO, F_GETFL, 0)) < 0)
+ perror("fcntl");
+! flags ^= O_NONBLOCK;
+
+ if(fcntl(STDIN_FILENO, F_SETFL, flags) < 0)
+ perror("fcntl");
+--- 342,348 ----
+
+ if((flags = fcntl(STDIN_FILENO, F_GETFL, 0)) < 0)
+ perror("fcntl");
+! flags &= ~O_NONBLOCK;
+
+ if(fcntl(STDIN_FILENO, F_SETFL, flags) < 0)
+ perror("fcntl");
+***************
+*** 394,400 ****
+ /* Set stdin to blocking */
+ if((flags = fcntl(STDIN_FILENO, F_GETFL, 0)) < 0)
+ perror("fcntl");
+! flags ^= O_NONBLOCK;
+ if(fcntl(STDIN_FILENO, F_SETFL, flags) < 0)
+ perror("fcntl");
+ }
+--- 402,408 ----
+ /* Set stdin to blocking */
+ if((flags = fcntl(STDIN_FILENO, F_GETFL, 0)) < 0)
+ perror("fcntl");
+! flags &= ~O_NONBLOCK;
+ if(fcntl(STDIN_FILENO, F_SETFL, flags) < 0)
+ perror("fcntl");
+ }