ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/pcomb.c
(Generate patch)

Comparing ray/src/px/pcomb.c (file contents):
Revision 1.23 by greg, Mon Nov 11 14:01:24 1991 UTC vs.
Revision 2.3 by greg, Mon Aug 10 12:10:26 1992 UTC

# Line 124 | Line 124 | char   *argv[];
124                                  goto usage;
125                          }
126                  else {
127 <                        input[nfiles].name = argv[a];
128 <                        input[nfiles].fp = argv[a][0]=='!' ?
129 <                                        popen(argv[a]+1, "r") :
130 <                                        fopen(argv[a], "r");
127 >                        if (argv[a][0] == '!') {
128 >                                input[nfiles].name = "<Command>";
129 >                                input[nfiles].fp = popen(argv[a]+1, "r");
130 >                        } else {
131 >                                input[nfiles].name = argv[a];
132 >                                input[nfiles].fp = fopen(argv[a], "r");
133 >                        }
134                          if (input[nfiles].fp == NULL) {
135                                  perror(argv[a]);
136                                  quit(1);
# Line 449 | Line 452 | char   *msg;
452   quit(code)
453   int     code;
454   {
455 +        int  status;
456 +
457 +        if (code == 0)                  /* reap any children */
458 +                while (wait(&status) != -1)
459 +                        if (code == 0)
460 +                                code = status>>8 & 0xff;
461          exit(code);
462   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines