From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA08410; Tue, 22 Oct 2002 09:57:56 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA08252 for ; Tue, 22 Oct 2002 09:57:55 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g9M7vf522565; Tue, 22 Oct 2002 09:57:41 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA07826; Tue, 22 Oct 2002 09:57:40 +0200 (MET DST) Date: Tue, 22 Oct 2002 09:57:40 +0200 From: Xavier Leroy To: Dmitry Bely Cc: caml-list@inria.fr Subject: Re: [Caml-list] ocamldebug and windows Message-ID: <20021022095740.A6289@pauillac.inria.fr> References: <20021021152135.E12164@pauillac.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from dbely@mail.ru on Mon, Oct 21, 2002 at 06:17:19PM +0400 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > > You need a bit more than this: file and socket handles also need some > > checkpointing (of the kind that fork() does on file descriptors in the > > Unix world). > > Really? Correct me if I am wrong, but fork() should care of the proper > handle copying because it creates the new child process, that should be in > the same state. But I suggest to use the only process, just save/restore > its state somethere when needed. This way the memory dump seems to be > sufficient, no? I'm afraid not. Consider the following program: time t1: open file /tmp/foo, obtaining file handle #3 (for instance) time t2: work on this file handle time t3: close file handle time t4: Assume we're at time t4, and want to go back to the checkpoint at time t2. With the solution you outline, file handle #3 is closed and re-executing the code between t2 and t3 fails. It is true that time-travel in the presence of I/O is, in general, impossible. (You can't "un-send" the network packets that were already sent!) However, I'd like it to work at least for programs that read or write regular files, as in the example above. Under Unix, fork() gets us 90% there -- there is still an issue with the reading/writing position being shared (not duplicated) between the parent and child process, but we are considering hacks to work around this. - Xavier Leroy ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners