perror("error writing on tmp file");
return(res);
}
snprintf(path, PATH_MAX, "/proc/self/fd/%d", fd);
res = linkat(AT_FDCWD, path, dirfd, file, AT_SYMLINK_FOLLOW);
if (res < 0) {
perror("error writing on tmp file");
return(res);
}
snprintf(path, PATH_MAX, "/proc/self/fd/%d", fd);
res = linkat(AT_FDCWD, path, dirfd, file, AT_SYMLINK_FOLLOW);
if (res < 0) {