From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 7 Nov 2014 01:45:50 +0300 From: Oleg To: 9fans@9fans.net Message-ID: <20141106224550.GA25607@localhost> References: <20141106210544.GA20298@localhost> <3600f4a8554d9bc476742f16a142efcf@ladd.quanstro.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3600f4a8554d9bc476742f16a142efcf@ladd.quanstro.net> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [9fans] atexit() & atexitdont() Topicbox-Message-UUID: 2467039e-ead9-11e9-9d60-3106f5b1d025 On Thu, Nov 06, 2014 at 04:26:04PM -0500, erik quanstrom wrote: > On Thu Nov 6 16:07:56 EST 2014, lego12239@yandex.ru wrote: > > Hi, all. > > > > I looked at atexit() and atexitdont() and i don't understand why these > > functions are implemented with a static array instead of singly linked list? > > May be somebody with a greater plan9 experience can help me with my question. > > perhaps a linked list would make sense, but atexits(2) doesn't say which order > the functions will be run in. It say - in reverse order. > and it doesn't seem like a great idea to depend on > atexits running things in a particular order. Why? There are various situations...