As well as what BrowserUk said, you should be using closedir to close a directory handle opened by opendir instead of close which works on filehandles instead.
In reply to Re: Threads + opendir = Segmentation Fault (core dumped)
by jwkrahn
in thread Threads + opendir = Segmentation Fault (core dumped)
by gulden
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |