mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-08-03 17:59:07 -04:00
41 lines
1.2 KiB
Plaintext
41 lines
1.2 KiB
Plaintext
$NetBSD: patch-aj,v 1.8 2016/07/16 21:13:22 wiz Exp $
|
|
|
|
--- plugins/r/src/tm_r.c.orig 2016-05-26 01:33:18.000000000 +0000
|
|
+++ plugins/r/src/tm_r.c
|
|
@@ -18,6 +18,7 @@
|
|
#include <util.h>
|
|
#endif
|
|
|
|
+#include <util.h>
|
|
#include <utmp.h>
|
|
#include <unistd.h>
|
|
#include <termios.h>
|
|
@@ -844,7 +845,11 @@ int main(int argc, char *argv[])
|
|
char *TEXMACS_HOME_PATH, *TEXMACS_R, *TEXMACS_SEND_E, *TEXMACS_LIB, *HOME ;
|
|
struct termios termi ;
|
|
sigset_t sigmask, orig_sigmask;
|
|
-
|
|
+#if defined(__DragonFly__)
|
|
+ sigset_t cur_sigmask;
|
|
+ int select_retval;
|
|
+#endif
|
|
+
|
|
struct stat stat_buf;
|
|
|
|
name = getenv("TEXMACS_R_SESSION") ;
|
|
@@ -1007,7 +1012,14 @@ unsetenv( "DYLD_LIBRARY_PATH") ;
|
|
|
|
// We will wait till something happens using pselect.
|
|
|
|
+#if defined(__DragonFly__)
|
|
+ sigprocmask(SIG_SETMASK, &orig_sigmask, &cur_sigmask);
|
|
+ select_retval = select( subprocess+1, &rd, &wr, &er, NULL );
|
|
+ sigprocmask(SIG_SETMASK, &cur_sigmask, NULL);
|
|
+ if ( select_retval > 0) {
|
|
+#else
|
|
if( (pselect( subprocess+1, &rd, &wr, &er, NULL, &orig_sigmask )) > 0 ) {
|
|
+#endif
|
|
if( FD_ISSET( STDIN_FILENO, &er) ) exit(0) ;
|
|
if( FD_ISSET( STDOUT_FILENO, &er) ) exit(0) ;
|
|
if( FD_ISSET( subprocess, &er) ) exit(0) ;
|