Fix for bug : 6702990, bugzilla : 17876

Couple of issues here :

1. rarian forks a process to run "manpath", this child was exiting using exit(0)
    call instead of _exit(0) call, resulting in some file descriptors being left
    open for the child. And later on these FD's were being constantly polled
    which resulted in CPU usage going nuts.  Solution is to simply call _exit(0)
    which closes the child env properly.

2. In same code area, waitpid() was not being called on the child PID to ensure
    it had exited, thus a defunct process was being left lying around.

Attached patch cleans up the usage of File Descriptors in the code and exits the
child process cleanly using _exit(0).

cheers

Matt
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rarian-03-yelp-performance.diff
URL: 
<http://mail.opensolaris.org/pipermail/jds-review/attachments/20081002/191cfe88/attachment.ksh>

Reply via email to