1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

dup2 closes given descriptors, so no need for the explicit close.

This commit is contained in:
Witold Filipczyk 2007-01-18 16:41:57 +01:00 committed by Kalle Olavi Niemitalo
parent bef03e6106
commit b517367cc8

View File

@ -345,11 +345,8 @@ fsp_protocol_handler(struct connection *conn)
}
if (!cpid) {
close(1);
dup2(fsp_pipe[1], 1);
close(0);
dup2(open("/dev/null", O_RDONLY), 0);
close(2);
dup2(header_pipe[1], 2);
close(fsp_pipe[0]);
close(header_pipe[0]);