[asterisk-users] Explication for ast_safe_system

Eric Dantie edantie at gmail.com
Sat Jul 19 06:41:04 CDT 2008


Can someone please explain the reason on the following code (in
asterisk.c, function ast_safe_system()):

/* Close file descriptors and launch system command */
for (x = STDERR_FILENO + 1; x < 4096; x++)
    close(x);


Why to close so many descriptors?

Thanks in advance
Éric



More information about the asterisk-users mailing list