From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1Opt-0000eq-Lg for qemu-devel@nongnu.org; Fri, 01 Feb 2013 17:15:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U1OmQ-00017Z-PP for qemu-devel@nongnu.org; Fri, 01 Feb 2013 17:11:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51504) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1OmQ-00017N-G4 for qemu-devel@nongnu.org; Fri, 01 Feb 2013 17:08:18 -0500 Message-ID: <510C351D.3040807@redhat.com> Date: Fri, 01 Feb 2013 14:35:25 -0700 From: Eric Blake MIME-Version: 1.0 References: <510C0935.2020902@redhat.com> In-Reply-To: <510C0935.2020902@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2UIGSOEMVDDWJEJGHSXUC" Subject: Re: [Qemu-devel] [RFC][PATCH]Add timestamp to error message List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek Cc: "pbonzini@redhat.com" , "dle-develop@lists.sourceforge.net" , Seiji Aguchi , Satoru Moriya , "qemu-devel@nongnu.org" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2UIGSOEMVDDWJEJGHSXUC Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 02/01/2013 11:28 AM, Laszlo Ersek wrote: > Hello Seiji-san, >=20 > On 02/01/13 15:53, Seiji Aguchi wrote: >=20 >> A logic calculating a time is copied from libvirt, src/util/virtime.c.= >=20 >> +static void error_print_timestamp(void) >=20 > Are gmtime() + strftime() unsuitable for some reason? They are not async-signal safe, so they are not usable in between a fork() and exec*(). Libvirt avoids them because it DOES log information including timestamps in between fork/exec (and prior to writing libvirt's virtime.c, we DID hit cases where libvirt would deadlock a child process due to the non-safe use of a more naive timestamp generator), but I don't know if qemu suffers from the same restriction of when it has anything worth logging. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2UIGSOEMVDDWJEJGHSXUC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRDDUdAAoJEKeha0olJ0NqTGsH/38Tc5Lz1QL2C4S1mQHFly7F 5vZsxHefNNjxti7gdoHy5Ko5NIAogVijiJyibCOgM3Z1Cl65LWAaTq04klP8uebA MhNQjeHmq04YFhJ0pqaiNAso+Nv/bgQTlMpsChbzXl/w1Nhoxmj6PNqS7Kf3xkdB ++RrieESchEiZQpsRSX3CvsO7yx7+lCUSZh34WXaI77AuH0lR5VY5UTyy+1x/zCv BSiaaBXkFC66dhp4NUWySstcgnmDLWG9kcAqp/n598bQkuWRHqkQ6y0RWWc+j4fi dtHl3eBYcNlCBbMAQYlCCGkscpPwPgg9kXC7wQDwohUZsu0WfkgbCpleAKB5Wgk= =KTmq -----END PGP SIGNATURE----- ------enig2UIGSOEMVDDWJEJGHSXUC--