[FIX] Clean up zombie processes
authorRobin Luckey <robin@ohloh.net>
Thu, 13 Aug 2009 23:37:28 +0000 (16:37 -0700)
committerRobin Luckey <robin@ohloh.net>
Thu, 13 Aug 2009 23:37:28 +0000 (16:37 -0700)
commitebff4f1eca3bf64c1130750ad7c990488623014f
treebcb4b6bb76388c9e7df5d9792eaa2d388c3f0a66
parentf1a7d78b59ce962399d593f019afc0a335d4b664
[FIX] Clean up zombie processes

popen() must be matched by pclose(), not fclose().

Every time we forked out to the `file` command line tool, we failed
to clean up the resulting process. Since we sometimes did this
thousands of times, the operating system became cranky and refused
to open any more processes for us. Reboots ensued.
src/detector.c