After opening an attachment, kmail does not remove its process on exit. It is not possible to launch kmail again, unless I kill the previous process. In fact, a second process is starting but kmail does not appear. If launching kmail on console I get these messages after opening a PDF: | command= "okular %U" args= ("okular %U", "file:///tmp/messageviewer_attachment_JpSXKU/RE1258538069258.pdf") | EXEC "/usr/bin/okular /tmp/messageviewer_attachment_JpSXKU/RE1258538069258.pdf" | EXEC done | sleeping... This happen with every kind of attachment.
I confirm it. it seems to be a bug in kf5 framework as we use kf5 method.
The console messages above are from kioexec, which was a fix implemented a long time ago for bug 130709. kioexec sleeps for 180 seconds after starting the application but before removing the temporary file, so that if the application forks and the parent returns immediately the file will not be removed before the child application has the chance to open it. If you wait for 3 minutes after opening the attachment, then you will find that kmail exits correctly. The question, therefore, is why kmail is waiting for the opening of the attachment to finish - it should launch it in a separate background process.
The problem has now been fixed and no longer occurs. [kmail2 5.22.3 (22.12.3) | KDE Plasma version: 5.27.2 | KDE Framework Version: 5.103.0 | Qt version: 5.15.8]