3 --- plugins/r/src/tm_r.c.orig 2013-02-11 13:53:51.000000000 +0000
4 +++ plugins/r/src/tm_r.c
5 @@ -842,7 +842,11 @@ int main(int argc, char *argv[])
6 char *TEXMACS_HOME_PATH, *TEXMACS_R, *TEXMACS_SEND_E, *TEXMACS_LIB, *HOME ;
8 sigset_t sigmask, orig_sigmask;
10 +#if defined(__DragonFly__)
11 + sigset_t cur_sigmask;
17 name = getenv("TEXMACS_R_SESSION") ;
18 @@ -1003,7 +1007,14 @@ DEBUG_LOG( "TEXMACS_SEND=%s",TEXMACS_SEN
20 // We will wait till something happens using pselect.
22 +#if defined(__DragonFly__)
23 + sigprocmask(SIG_SETMASK, &orig_sigmask, &cur_sigmask);
24 + select_retval = select( subprocess+1, &rd, &wr, &er, NULL );
25 + sigprocmask(SIG_SETMASK, &cur_sigmask, NULL);
26 + if ( select_retval > 0) {
28 if( (pselect( subprocess+1, &rd, &wr, &er, NULL, &orig_sigmask )) > 0 ) {
30 if( FD_ISSET( STDIN_FILENO, &er) ) exit(0) ;
31 if( FD_ISSET( STDOUT_FILENO, &er) ) exit(0) ;
32 if( FD_ISSET( subprocess, &er) ) exit(0) ;