mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
fsp: Comment and FIXME about closing file descriptors.
This commit is contained in:
parent
c3a6ca3ef0
commit
1ad016bdd5
@ -427,6 +427,17 @@ fsp_protocol_handler(struct connection *conn)
|
||||
close(fsp_pipe[0]);
|
||||
close(header_pipe[0]);
|
||||
|
||||
/* There may be outgoing data in stdio buffers
|
||||
* inherited from the parent process. The parent
|
||||
* process is going to write this data, so the child
|
||||
* process must not do that. Closing the file
|
||||
* descriptors ensures this.
|
||||
*
|
||||
* FIXME: If something opens more files and gets the
|
||||
* same file descriptors and does not close them
|
||||
* before exit(), then stdio may attempt to write the
|
||||
* buffers to the wrong files. This might happen for
|
||||
* example if fsplib calls syslog(). */
|
||||
close_all_non_term_fd();
|
||||
do_fsp(conn);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user