Print this page
5704 libzfs can only handle 255 filedescriptors
*** 622,638 ****
if ((hdl->libzfs_fd = open(ZFS_DEV, O_RDWR)) < 0) {
free(hdl);
return (NULL);
}
! if ((hdl->libzfs_mnttab = fopen(MNTTAB, "r")) == NULL) {
(void) close(hdl->libzfs_fd);
free(hdl);
return (NULL);
}
! hdl->libzfs_sharetab = fopen("/etc/dfs/sharetab", "r");
if (libzfs_core_init() != 0) {
(void) close(hdl->libzfs_fd);
(void) fclose(hdl->libzfs_mnttab);
(void) fclose(hdl->libzfs_sharetab);
--- 622,638 ----
if ((hdl->libzfs_fd = open(ZFS_DEV, O_RDWR)) < 0) {
free(hdl);
return (NULL);
}
! if ((hdl->libzfs_mnttab = fopen(MNTTAB, "rF")) == NULL) {
(void) close(hdl->libzfs_fd);
free(hdl);
return (NULL);
}
! hdl->libzfs_sharetab = fopen("/etc/dfs/sharetab", "rF");
if (libzfs_core_init() != 0) {
(void) close(hdl->libzfs_fd);
(void) fclose(hdl->libzfs_mnttab);
(void) fclose(hdl->libzfs_sharetab);