From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.emacs.devel Subject: Re: Dumper problems and a possible solutions Date: Thu, 26 Jun 2014 00:14:34 -0400 Message-ID: <20140626041434.GH179@brightrain.aerifal.cx> References: <53AB0EF8.4090608@yandex.ru> <831tucrguf.fsf@gnu.org> <20140625183241.GW179@brightrain.aerifal.cx> <83wqc4q0xl.fsf@gnu.org> <20140625190333.GZ179@brightrain.aerifal.cx> <20140625202403.GB179@brightrain.aerifal.cx> <20140625220758.GE179@brightrain.aerifal.cx> <53AB8D50.5020005@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1403756098 15408 80.91.229.3 (26 Jun 2014 04:14:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Jun 2014 04:14:58 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 26 06:14:51 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1X015G-0000de-Ch for ged-emacs-devel@m.gmane.org; Thu, 26 Jun 2014 06:14:50 +0200 Original-Received: from localhost ([::1]:42177 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X015F-0002Ld-US for ged-emacs-devel@m.gmane.org; Thu, 26 Jun 2014 00:14:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43270) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0159-0002LR-1X for emacs-devel@gnu.org; Thu, 26 Jun 2014 00:14:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0154-0008Um-6F for emacs-devel@gnu.org; Thu, 26 Jun 2014 00:14:42 -0400 Original-Received: from 216-12-86-13.cv.mvl.ntelos.net ([216.12.86.13]:44457 helo=brightrain.aerifal.cx) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0154-0008Uh-10 for emacs-devel@gnu.org; Thu, 26 Jun 2014 00:14:38 -0400 Original-Received: from dalias by brightrain.aerifal.cx with local (Exim 3.15 #2) id 1X0150-0005tJ-00; Thu, 26 Jun 2014 04:14:34 +0000 Content-Disposition: inline In-Reply-To: <53AB8D50.5020005@yandex.ru> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 216.12.86.13 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:172743 Archived-At: On Thu, Jun 26, 2014 at 07:02:40AM +0400, Dmitry Antipov wrote: > BTW, if you're doing your own libc, why do not implement Solaris-style dldump()? Because dumping isn't really possible to do in a correct and meaningful way without serious restrictions on what the code can do. See Eli Zaretskii's email (Message-id: <83simspexv.fsf@gnu.org>) stating that "Emacs cannot use such libraries." For a single application like Emacs that's a decision that can be made. But to say "[X feature of] libc can't support such code" when the code is perfectly valid C is not really appropriate. There's all sorts of state that cannot be preserved across dumping but that's completely reasonable to have, such as pid, lock owners (tids will not be the same after a dump), open files, etc. At one point I actually tried to do a Solaris-style forkall() -- I mention this because it has a lot of the same issues -- and partly had it working, but the lock ownership issue turned out to be impractical to solve and I abandoned it. Rich