1: #include "signal.h"
   2: #include "stdio.h"
   3: #include "lrnref"
   4: 
   5: wrapup(n)
   6: int n;
   7: {
   8:     /* this routine does not use 'system' because it wants
   9: 	 interrupts turned off */
  10:     int retval, pid, pidw;
  11: 
  12:     signal(SIGINT, SIG_IGN);
  13:     chdir("..");
  14:     if ( (pid=fork()) ==0) {
  15:         signal(SIGHUP, SIG_IGN);
  16:         execl("/bin/rm", "rm", "-r", dir, 0);
  17:         execl("/usr/bin/rm", "rm", "-r", dir, 0);
  18:         fprintf(stderr, "Can't find 'rm' command.\n");
  19:         exit(0);
  20:     }
  21:     printf("Bye.\n"); /* not only does this reassure user but
  22: 			it stalls for time while deleting directory */
  23:     fflush(stdout);
  24:     /* printf("Wantd %d got %d val %d\n",pid, pidw, retval); */
  25:     exit(n);
  26: }
Last modified: 1981-07-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 628
Valid CSS Valid XHTML 1.0 Strict