• E
    build: use re-entrant functions in virsh · 44342a0e
    Eric Blake 提交于
    Yesterday's commit 15d2c9fa pointed out that virsh was still using
    localtime(), which is not thread-safe, even though virsh is
    definitely multi-threaded.  Even if we only ever triggered it from
    one thread, it's better safe than sorry for maintenance purposes.
    
    * 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.
    44342a0e
virsh.c 76.4 KB