goto error_destroy;
}
- writer->trace_dir_fd = open(path, O_RDONLY | O_DIRECTORY,
- S_IRWXU | S_IRWXG);
+ writer->trace_dir_fd = open(path, O_RDONLY, S_IRWXU | S_IRWXG);
if (writer->trace_dir_fd < 0) {
perror("open");
goto error_destroy;
}
if (writer->trace_dir_fd > 0) {
- close(writer->trace_dir_fd);
+ if (close(writer->trace_dir_fd)) {
+ perror("close");
+ abort();
+ }
}
if (writer->metadata_fd > 0) {
- close(writer->metadata_fd);
+ if (close(writer->metadata_fd)) {
+ perror("close");
+ abort();
+ }
}
if (writer->environment) {