[libvirt] [PATCH] build: use re-entrant functions in virsh

Martin Kletzander mkletzan at redhat.com
Wed Sep 5 06:52:02 UTC 2012


On 09/05/2012 01:36 AM, Eric Blake wrote:
> Today's patches pointed out that virsh was still using localtime(),
> which is not thread-safe, even though virsh is definitely
> multi-threaded.
> 
> * cfg.mk (exclude_file_name_regexp--sc_prohibit_nonreentrant):
> Tighten the rule.
> * tools/virsh.c (vshOutputLogFile): Avoid localtime.
> (vshEditWriteToTempFile, vshEditReadBackFile, cmdCd, cmdPwd)
> (vshCloseLogFile): Avoid strerror.
> * tools/console.c (vshMakeStdinRaw): Likewise.
> * tools/virsh-domain.c (vshGenFileName): Fix spacing in previous
> patch.
> ---
>  cfg.mk               |  2 +-
>  tools/console.c      | 11 +++++++----
>  tools/virsh-domain.c |  2 +-
>  tools/virsh.c        | 40 ++++++++++++++++++++++++----------------
>  4 files changed, 33 insertions(+), 22 deletions(-)
> 

ACK,

Martin




More information about the libvir-list mailing list