[BACK]Return to script.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / script

Diff for /src/usr.bin/script/script.c between version 1.20 and 1.21

version 1.20, 2004/09/14 23:53:07 version 1.21, 2004/10/10 03:59:04
Line 56 
Line 56 
  */   */
   
 #ifndef lint  #ifndef lint
 static char copyright[] =  static const char copyright[] =
 "@(#) Copyright (c) 1980, 1992, 1993\n\  "@(#) Copyright (c) 1980, 1992, 1993\n\
         The Regents of the University of California.  All rights reserved.\n";          The Regents of the University of California.  All rights reserved.\n";
 #endif /* not lint */  #endif /* not lint */
   
 #ifndef lint  #ifndef lint
 #if 0  #if 0
 static char sccsid[] = "@(#)script.c    8.1 (Berkeley) 6/6/93";  static const char sccsid[] = "@(#)script.c      8.1 (Berkeley) 6/6/93";
 #endif  #endif
 static char rcsid[] = "$OpenBSD$";  static const char rcsid[] = "$OpenBSD$";
 #endif /* not lint */  #endif /* not lint */
   
 #include <sys/types.h>  #include <sys/types.h>
Line 111 
Line 111 
 int  int
 main(int argc, char *argv[])  main(int argc, char *argv[])
 {  {
           extern char *__progname;
         struct sigaction sa;          struct sigaction sa;
         struct termios rtt;          struct termios rtt;
         struct winsize win;          struct winsize win;
Line 125 
Line 126 
                         aflg = 1;                          aflg = 1;
                         break;                          break;
                 default:                  default:
                         (void)fprintf(stderr, "usage: script [-a] [file]\n");                          fprintf(stderr, "usage: %s [-a] [file]\n", __progname);
                         exit(1);                          exit(1);
                 }                  }
         argc -= optind;          argc -= optind;
Line 161 
Line 162 
   
         child = fork();          child = fork();
         if (child < 0) {          if (child < 0) {
                 perror("fork");                  warn("fork");
                 fail();                  fail();
         }          }
         if (child == 0) {          if (child == 0) {
                 subchild = child = fork();                  subchild = child = fork();
                 if (child < 0) {                  if (child < 0) {
                         perror("fork");                          warn("fork");
                         fail();                          fail();
                 }                  }
                 if (child)                  if (child)
Line 299 
Line 300 
         (void)fclose(fscript);          (void)fclose(fscript);
         login_tty(slave);          login_tty(slave);
         execl(shell, shell, "-i", (char *)NULL);          execl(shell, shell, "-i", (char *)NULL);
         perror(shell);          warn("%s", shell);
         fail();          fail();
 }  }
   

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21