* Boston, MA 021110-1307, USA.
*/
-#define _GNU_SOURCE
-
#include <unistd.h>
#include <stdint.h>
#include <dirent.h>
int ret = 0;
int subvol_fd;
pthread_t t_read;
- pthread_attr_t t_attr;
void *t_err = NULL;
struct recv_args r;
goto out;
}
- ret = pthread_attr_init(&t_attr);
- if (ret < 0) {
- fprintf(stderr, "ERROR: pthread init failed. %s\n",
- strerror(ret));
- goto out;
- }
-
ret = pipe(pipefd);
if (ret < 0) {
ret = errno;
goto out;
}
- ret = pthread_create(&t_read, &t_attr, process_thread, &r);
+ ret = pthread_create(&t_read, NULL, process_thread, &r);
if (ret < 0) {
ret = errno;
fprintf(stderr, "ERROR: pthread create failed. %s\n",
goto out;
}
- pthread_attr_destroy(&t_attr);
out:
return !!ret;
}