63 |
snprintf(command, sizeof(command), "gzip -c >%s", path); |
snprintf(command, sizeof(command), "gzip -c >%s", path); |
64 |
op = popen(command, "w"); |
op = popen(command, "w"); |
65 |
if (op == NULL) |
if (op == NULL) |
66 |
die("cannot create file '%s'.", path); |
die("cannot execute command '%s'.", command); |
67 |
} else { |
} else { |
68 |
op = fopen(path, "w"); |
op = fopen(path, "w"); |
69 |
if (op == NULL) |
if (op == NULL) |
70 |
die("cannot execute command '%s'.", command); |
die("cannot create file '%s'.", path); |
71 |
} |
} |
72 |
return op; |
return op; |
73 |
} |
} |