From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <21e3f8eee50170d6fcd21c43384eba04@felloff.net> Date: Tue, 16 Feb 2016 19:01:38 +0100 From: cinap_lenrek@felloff.net To: 9fans@9fans.net In-Reply-To: <8FB7CBFD-7334-4F9F-8C71-571DEF9FAD31@ar.aichi-u.ac.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] file descriptor leak Topicbox-Message-UUID: 853366cc-ead9-11e9-9d60-3106f5b1d025 its worse. the static msg.msg is useless, its never set anywhere. the interface of system() makes no sense. its only used for running "outside" and the parent proc doesnt need the fd to /dev/null, it could as well just open it in the child like: close(0); open("/dev/null", OREAD); the caller goes at some lengths queueing processes waiting for the remount to complete, but does it in two levels. thers a sleep and a qlock. limitation on the number of processes that can be queued on a qlock()? also, when fork() returns -1, it kills the parent. the whole thing about remounting /net.alt seems wrong. it probably fixed some issue at the labs with /net.alt being imported from some other machine that kept rebooting or something. after spending 5 minutes writing the code fixing all these issues mentiond above, i'll just throw it all away and delete the whole remounting logic for /net.alt in 9front. -- cinap