[ http://dev.sourcefabric.org/browse/LS-512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21940#action_21940 ]
Romain Beauxis commented on LS-512: ----------------------------------- To clarify: by tested I mean to check if: 1) it compiles fine 2) it does anything The patch is intended for win32 to only 1) applies in this case. > External processes inherit opened file descriptor, including opened sockets. > ---------------------------------------------------------------------------- > > Key: LS-512 > URL: http://dev.sourcefabric.org/browse/LS-512 > Project: Liquidsoap > Issue Type: Bug > Components: Liquidsoap > Reporter: Romain Beauxis > Priority: Critical > > When liquidsoap spawns a new process using Ocaml's open_process* functions, > the new process is created using fork() and therefore inherits all opened > file descriptors from liquidsoap. > This leads to many different type of issues, among which: > * If liquidsoap stops before an external process, any port opened by > liquidsoap remains open until all external processes have terminated > * All external processes have access to the file/sockets opened by > liquidsoap, in particular they may read a file whose content is supposed to > be protected (password) or listen to network traffic (source password for > instance) > The problem is not easy. There are several possibilities: > * Define our own implementation of Unix.open_process* > * Use some shell trickery to close the descriptors before invoking the new > process. Something like: > "/bin/ls /dev/fd/ | while read i; do if test "$i" -ge "3"; then exec > "$i<&-" 2>/dev/null; fi done; my_process > * Convince OCaml's maintainer to apply some patch and wait for a new release > of OCaml... -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://dev.sourcefabric.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ Savonet-devl mailing list Savonet-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/savonet-devl