diff --git a/libk3b/tools/k3biso9660backend.cpp b/libk3b/tools/k3biso9660backend.cpp --- a/libk3b/tools/k3biso9660backend.cpp +++ b/libk3b/tools/k3biso9660backend.cpp @@ -131,7 +131,7 @@ if( m_fd > 0 ) return true; else { - m_fd = ::open( QFile::encodeName( m_filename ), O_RDONLY|O_LARGEFILE ); + m_fd = ::open( QFile::encodeName( m_filename ), O_RDONLY|O_LARGEFILE|O_CLOEXEC ); return ( m_fd > 0 ); } } diff --git a/libk3bdevice/k3bdevice.cpp b/libk3bdevice/k3bdevice.cpp --- a/libk3bdevice/k3bdevice.cpp +++ b/libk3bdevice/k3bdevice.cpp @@ -171,7 +171,7 @@ K3b::Device::Device::Handle K3b::Device::openDevice( const char* name, bool write ) { K3b::Device::Device::Handle fd = HANDLE_DEFAULT_VALUE; - int flags = O_NONBLOCK; + int flags = O_NONBLOCK | O_CLOEXEC; if( write ) flags |= O_RDWR; else