version 1.26, 1999/11/07 05:16:28 |
version 1.27, 1999/11/07 05:31:53 |
|
|
char *log; |
char *log; |
{ |
{ |
pid_t pid; |
pid_t pid; |
|
char *base; |
char tmp[MAXPATHLEN]; |
char tmp[MAXPATHLEN]; |
|
|
|
if ((base = strrchr(COMPRESS, '/')) == NULL) |
|
base = COMPRESS; |
|
else |
|
base++; |
|
if (noaction) { |
|
printf("%s %s.0\n", base, log); |
|
return; |
|
} |
pid = fork(); |
pid = fork(); |
(void)sprintf(tmp, "%s.0", log); |
(void)sprintf(tmp, "%s.0", log); |
if (pid < 0) { |
if (pid < 0) { |
err(1, "fork"); |
err(1, "fork"); |
} else if (!pid) { |
} else if (!pid) { |
(void)execl(COMPRESS, "compress", "-f", tmp, 0); |
(void)execl(COMPRESS, base, "-f", tmp, 0); |
warn(COMPRESS); |
warn(COMPRESS); |
_exit(1); |
_exit(1); |
} |
} |