Dear Maintainer, I tried to reproduce this issue and found a difference between a minimal Bookworm VM with just running jwm window manager and my regular Plasma desktop.
In the minimal VM a `kstart5 kcalc` returns immediately, while at my regular Plasma desktop it blocks until the started application is closed. I found in the non-blocking case `KStart::windowAdded` gets executed and therefore `QCoreApplication::exit` is called. This seems to be caused by having useRule to be true in the `KStart::KStart` constructor, and therefore the connect call is not reached. Kind regards, Bernhard (rr) bt #0 0x00007ffb802b1860 in QCoreApplication::exit (returnCode=returnCode@entry=0) at kernel/qcoreapplication.cpp:1430 #1 0x000055a5e93fd065 in KStart::windowAdded (this=0x7fff2864b760, w=6291470) at ./kstart/kstart.cpp:201 #2 0x00007ffb802e8f4f in QtPrivate::QSlotObjectBase::call (a=0x7fff2864adc0, r=0x7fff2864b760, this=0x55a5e9b58230) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398 #3 doActivate<false> (sender=0x7ffb8174a440 <(anonymous namespace)::Q_QGS_g_kwmInstanceContainer::innerFunction()::holder>, signal_index=4, argv=0x7fff2864adc0) at kernel/qobject.cpp:3923 #4 0x00007ffb802e21ef in QMetaObject::activate (sender=sender@entry=0x7ffb8174a440 <(anonymous namespace)::Q_QGS_g_kwmInstanceContainer::innerFunction()::holder>, m=m@entry=0x7ffb81748700 <KWindowSystem::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fff2864adc0) at kernel/qobject.cpp:3983 #5 0x00007ffb8170e522 in KWindowSystem::windowAdded (this=this@entry=0x7ffb8174a440 <(anonymous namespace)::Q_QGS_g_kwmInstanceContainer::innerFunction()::holder>, _t1=<optimized out>, _t1@entry=6291470) at ./obj-x86_64-linux-gnu/src/KF5WindowSystem_autogen/EWIEGA46WW/moc_kwindowsystem.cpp:409 #6 0x00007ffb7b07363d in NETEventFilter::addClient (this=0x55a5e9b6baf0, w=6291470) at ./src/platforms/xcb/kwindowsystem.cpp:412 #7 0x00007ffb8172ea51 in NETRootInfo::update (this=0x55a5e9b6baf0, properties=..., properties2=...) at ./src/platforms/xcb/netwm.cpp:2033 #8 0x00007ffb7b071af7 in NETEventFilter::activate (this=<optimized out>) at ./src/platforms/xcb/kwindowsystem.cpp:183 #9 KWindowSystemPrivateX11::init (this=this@entry=0x7ffb74006730, what=what@entry=KWindowSystemPrivateX11::INFO_BASIC) at ./src/platforms/xcb/kwindowsystem.cpp:575 #10 0x00007ffb7b071d4c in KWindowSystemPrivateX11::connectNotify (this=0x7ffb74006730, signal=...) at ./src/platforms/xcb/kwindowsystem.cpp:536 #11 0x00007ffb8171fc35 in KWindowSystem::connectNotify (this=0x7ffb8174a440 <(anonymous namespace)::Q_QGS_g_kwmInstanceContainer::innerFunction()::holder>, signal=...) at ./src/kwindowsystem.cpp:380 #12 0x00007ffb802dea6a in QObjectPrivate::connectImpl (sender=sender@entry=0x7ffb8174a440 <(anonymous namespace)::Q_QGS_g_kwmInstanceContainer::innerFunction()::holder>, signal_index=4, receiver=receiver@entry=0x7fff2864b760, slot=slot@entry=0x7fff2864b670, slotObj=slotObj@entry=0x55a5e9b58230, type=<optimized out>, types=<optimized out>, senderMetaObject=<optimized out>) at kernel/qobject.cpp:5108 #13 0x00007ffb802ded45 in QObject::connectImpl (sender=0x7ffb8174a440 <(anonymous namespace)::Q_QGS_g_kwmInstanceContainer::innerFunction()::holder>, signal=signal@entry=0x7fff2864b660, receiver=receiver@entry=0x7fff2864b760, slot=slot@entry=0x7fff2864b670, slotObj=0x55a5e9b58230, type=Qt::AutoConnection, types=0x0, senderMetaObject=<optimized out>) at kernel/qobject.cpp:5038 #14 0x000055a5e93fc7bb in QObject::connect<void (KWindowSystem::*)(unsigned long long), void (KStart::*)(unsigned long long)> (type=Qt::AutoConnection, slot=(void (KStart::*)(KStart * const, unsigned long long)) 0x55a5e93fcfc0 <KStart::windowAdded(unsigned long long)>, receiver=0x7fff2864b760, signal=(void (KWindowSystem::*)(KWindowSystem * const, unsigned long long)) 0x7ffb8170e4e0 <KWindowSystem::windowAdded(unsigned long long)>, sender=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:268 #15 KStart::KStart (this=0x7fff2864b760) at ./kstart/kstart.cpp:78 #16 0x000055a5e93fac84 in main (argc=<optimized out>, argv=<optimized out>) at ./kstart/kstart.cpp:424 kde-cli-tools-5.27.2/kstart/kstart.cpp 62 KStart::KStart() 63 : QObject() 64 { 65 bool useRule = false; 66 67 #ifdef HAVE_X11 68 if (QX11Info::isPlatformX11()) { 69 NETRootInfo i(QX11Info::connection(), NET::Supported); 70 useRule = i.isSupported(NET::WM2KDETemporaryRules); 71 } 72 #endif 73 74 if (useRule) { 75 sendRule(); 76 } else { 77 // connect to window add to get the NEW windows 78 connect(KWindowSystem::self(), &KWindowSystem::windowAdded, this, &KStart::windowAdded); 79 }