🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #99880

Re: emacs18.55 on hpux7.0

#99880
From: Piet van Oostrum
Date: Fri, 27 Apr 1990 09:23
101 lines
3589 bytes
The last patch I posted on EMACS for HP-UX 7.0 (the timer interrupt to
catch ^G's while emacs is not reading input under X11) appears to have
problems with the interaction with X11. In short the timer interrupts can
come at times when X11 is active, and as it calls X11 itself, it gives an
undesired result, as X11 is not reentrant. Besides that it can clobber the
kbd_buffer. Here is an additional patch:

*** x11term.h~	Fri Sep 15 15:20:26 1989
--- x11term.h	Thu Apr 26 14:03:25 1990
***************
*** 11,17 ****
--- 11,22 ----
  #define sigmask(no) (1L << ((no) - 1))
  #endif
  
+ #ifdef HPUX
  #define BLOCK_INPUT_DECLARE() int BLOCK_INPUT_mask
+ #define BLOCK_INPUT() BLOCK_INPUT_mask = sigblock (sigmask (SIGALRM))
+ #define UNBLOCK_INPUT() sigsetmask (BLOCK_INPUT_mask)
+ #else /* not HPUX */
+ #define BLOCK_INPUT_DECLARE() int BLOCK_INPUT_mask
  #ifdef SIGIO
  #define BLOCK_INPUT() BLOCK_INPUT_mask = sigblock (sigmask (SIGIO))
  #define UNBLOCK_INPUT() sigsetmask (BLOCK_INPUT_mask)
***************
*** 19,23 ****
--- 24,29 ----
  #define BLOCK_INPUT()
  #define UNBLOCK_INPUT()
  #endif /* SIGIO */
+ #endif /* HPUX */
  
  #define CLASS  "emacs"	/* class id for GNU Emacs, used in .Xdefaults, etc. */
*** keyboard.c.~4~	Mon Apr 23 11:57:21 1990
--- keyboard.c	Thu Apr 26 14:46:27 1990
***************
*** 758,768 ****
        if (buf[i] == Ctl ('G'))
  	break;
      }
-   errno = old_errno;
  
    /* reestablish interrupt */
    signal (SIGALRM, empty_socket_interrupt);
    alarm (1);
  }
  
  #endif /* HPUX */
--- 758,769 ----
        if (buf[i] == Ctl ('G'))
  	break;
      }
  
    /* reestablish interrupt */
    signal (SIGALRM, empty_socket_interrupt);
    alarm (1);
+ 
+   errno = old_errno;
  }
  
  #endif /* HPUX */
***************
*** 1159,1167 ****
--- 1160,1177 ----
  #ifdef USG
    char buf[256 * BUFFER_SIZE_FACTOR];
    register int i;
+ #ifdef HPUX
+   int mask;
+ #endif
+ 
    if (kbd_count)
      abort ();
  
+ #ifdef HPUX
+   if (socket_alarm)
+       mask = sigblock (sigmask (SIGALRM));
+ #endif
+ 
    fcntl (fileno (stdin), F_SETFL, O_NDELAY);
  
    /* Read what is waiting.  */
***************
*** 1188,1193 ****
--- 1198,1208 ----
        if (buf[i] == Ctl ('G'))
  	break;
      }
+ 
+ #ifdef HPUX
+   if (socket_alarm)
+       sigsetmask(mask);
+ #endif
  
  #else /* not USG */
    you lose
-- 
Piet* van Oostrum, Dept of Computer Science, Utrecht University,
Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands.
Telephone: +31-30-531806   Uucp:   uunet!mcsun!ruuinf!piet
Telefax:   +31-30-513791   Internet:  piet@cs.ruu.nl   (*`Pete')
Technical Details
Message-ID: <3109@ruuinf.cs.ruu.nl>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!hp4nl!ruuinf!piet
References: <2504@syma.sussex.ac.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 114b0c,cf4d66f65ac7015f,start
X-Google-Attributes: gid114b0c,public
X-Google-Thread: fb2f1,cf4d66f65ac7015f,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1990-04-27 05:58:20 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!hp4nl!ruuinf!piet
From: piet@cs.ruu.nl (Piet van Oostrum)
Newsgroups: gnu.emacs.bug,comp.sys.hp
Subject: Re: emacs18.55 on hpux7.0
Keywords: interrupt, X11, emacs, hpux
Message-ID: <3109@ruuinf.cs.ruu.nl>
Date: 27 Apr 90 09:23:05 GMT
References: <2504@syma.sussex.ac.uk>
Sender: news@ruuinf.cs.ruu.nl
Reply-To: piet@cs.ruu.nl (Piet van Oostrum)
Followup-To: gnu.emacs.bug
Organization: Dept of Computer Science, Utrecht University, The Netherlands
Lines: 101
Posted: Fri Apr 27 10:23:05 1990
Supersedes: <3107@ruuinf.cs.ruu.nl>
In-reply-to: davidh@syma.sussex.ac.uk (David J Hobley)