Skip to content

Don't leak existing file handles to newly spanwed KIO workers

When a KIO worker is forked from an existing process, it might inherit file handles from said process. This is not desirable and useless in the context of KIO workers which won't make use of those file handles.

It also create practical problems in case of file handles for files on mounted samba shares which might be treated as locked.

It'd be better to not keep this open in the workers.

Qt6 now provides API on QProcess to automatically close file handles coming from the parent or grand-parent process. This patch just makes use of them.

Merge request reports