From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ke5jv-0008Mj-Vo for qemu-devel@nongnu.org; Fri, 12 Sep 2008 06:19:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ke5jt-0008M5-7f for qemu-devel@nongnu.org; Fri, 12 Sep 2008 06:18:58 -0400 Received: from [199.232.76.173] (port=37136 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ke5js-0008Ld-0V for qemu-devel@nongnu.org; Fri, 12 Sep 2008 06:18:56 -0400 Received: from smtp2a.orange.fr ([80.12.242.139]:21832) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ke5js-0006pV-7s for qemu-devel@nongnu.org; Fri, 12 Sep 2008 06:18:56 -0400 From: "Yann E. MORIN" Subject: Re: [Qemu-devel] How are the temporary files (-snapshot) created on Linux? Date: Fri, 12 Sep 2008 12:18:50 +0200 References: <20080912080402.1m7hh8oc0sgs4wsw@www.idoru.ch> In-Reply-To: <20080912080402.1m7hh8oc0sgs4wsw@www.idoru.ch> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200809121218.50167.yann.morin.1998@anciens.enib.fr> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: EQX Hello! On Friday 12 September 2008 08:04:02 EQX wrote: > The code says the -snapshot temporary files are created here: > /tmp/vl.*, but they are never visible for users. Using lsof, they have > a state of 'deleted'. How does this work exactly? What type of file is > this? It's done via some incantation of open(2) followed by unlink(2), something like: int fd; fd = open( "/tmp/vl.xxx", O_CREAT|... ); unlink( "/tmp/vl.xxx" ); /* Use the file somehow */ close( fd ); Regards, Yann E. MORIN. -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +0/33 662376056 | Software Designer | \ / CAMPAIGN | ___ | | --==< ^_^ >==-- `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | `------------------------------^-------^------------------^--------------------'