LD_ISCSI fix segfault on reconnect

iscsi_reconnect calls dup2 which is intercepted in ld_iscsi. Fix this by
calling the real dup2 in this case.
This commit is contained in:
Peter Lieven
2012-11-03 11:09:20 +01:00
committed by Ronnie Sahlberg
parent 4de36794f2
commit 01cd2ee42b

View File

@@ -387,6 +387,10 @@ int (*real_dup2)(int oldfd, int newfd);
int dup2(int oldfd, int newfd)
{
if (iscsi_fd_list[newfd].is_iscsi) {
return real_dup2(oldfd, newfd);
}
close(newfd);
if (iscsi_fd_list[oldfd].is_iscsi == 1) {