On 12/11/2015 06:42 AM, Chet Ramey wrote: > On 12/11/15 12:40 AM, Yoriyuki Yamagata wrote: >> Dear list, >> >> I found that bash tries to close the same fd twice, consecutively. I’m >> using Mac OS X Yosemite, and bash is the newest available (bash-master from >> http://tiswww.case.edu/php/chet/bash/bashtop.html yesterday). > > That's harmless.
Only if bash is single-threaded (it is) and if no signal handler can create fds (that, I'm less sure of). It is absolutely harmful in a multi-threaded program, or in a program where a signal handler might open an fd and the signal can occur in the window between the two close()s. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature