[1641] in testers

home help back first fref pref prev next nref lref last post

Patch to edsc: do_trn.c

daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Tue Jul 30 23:03:19 1991

Date: Tue, 30 Jul 91 23:03:13 -0400
From: tytso@ATHENA.MIT.EDU (Theodore Ts'o)
To: testers@ATHENA.MIT.EDU
Reply-To: tytso@ATHENA.MIT.EDU

The following patch is necessary to stop edsc from looping under some
circumstances when the 'F' command in emacs discuss is used (as reported
by jfc).

						- Ted


*** /tmp/,RCSt1011667	Tue Jul 30 22:50:27 1991
--- do_trn.c	Tue Jul 30 22:49:28 1991
***************
*** 16,28 ****
  #include <sys/types.h>
  #include <sys/file.h>
  #include <signal.h>
- #include <string.h>
  #include <sys/wait.h>
  #include <ctype.h>
  #include <sys/time.h>
  #include <netdb.h>
  #ifdef SVR4
  #include <fcntl.h>
  #endif
  #include "edsc.h"
  
--- 16,30 ----
  #include <sys/types.h>
  #include <sys/file.h>
  #include <signal.h>
  #include <sys/wait.h>
  #include <ctype.h>
  #include <sys/time.h>
  #include <netdb.h>
  #ifdef SVR4
+ #include <string.h>
  #include <fcntl.h>
+ #else
+ #include <strings.h>
  #endif
  #include "edsc.h"
  
***************
*** 231,236 ****
--- 233,239 ----
       cache_pc = 0;
       cache_working = 1;
       tinfo = cache_current->t_info;
+      (void) unlink(output_fn);
       if (link(cache_current->filename, output_fn)) {
  	     int	fd, rfd, cc;
  	     char	buf[8192];
***************
*** 248,254 ****
  		     dsc_destroy_name_blk(&nb);
  		     return;
  	     }
! 	     while ((cc = read(rfd, buf, sizeof(buf))) >= 0) {
  		     if (cc != write(fd, buf, cc)) {
  			     printf("; Failed write!\n");
  			     dsc_destroy_name_blk(&nb);
--- 251,257 ----
  		     dsc_destroy_name_blk(&nb);
  		     return;
  	     }
! 	     while ((cc = read(rfd, buf, sizeof(buf))) > 0) {
  		     if (cc != write(fd, buf, cc)) {
  			     printf("; Failed write!\n");
  			     dsc_destroy_name_blk(&nb);

home help back first fref pref prev next nref lref last post