helloSystem / helloSystem/launch
Programs launched with 'launch' crash if they try to use stderr after X seconds
- Lingua principale
- C++
- Stelle
- 17
- Fork
- 6
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
* When an application is launched through the `launch` command, then it will exit as soon as it wants to print something to stdout and/or stderr after the [`p.waitForFinished period`](https://github.com/helloSystem/launch/commit/c238bcc13b8ea1b58b6690c47d073b75013d0156#diff-34d21af3c614ea3cee120df276c9c4ae95053830d7f1d3deaf009a4625409ad2R301) has elapsed
* ~~No output is printed to stdout at all before the `p.waitForFinished period` has elapsed~~ __fixed__ using `p.setProcessChannelMode(QProcess::ForwardedChannels);`
* If `launch Menu` is used to launch the global menu bar, then it will exit if the `p.waitForFinished period` has elapsed and the user then selects any menu item from the System menu (but not from some other menus). Possibly because selecting commands from the System menu makes liberal use of `qDebug()` to print debug information to the console?
* If `qpdf` is launched with the `launch` command, then it will exit after the `p.waitForFinished period` (when set to 3 seconds, possibly because around 3 seconds it wants to write `QKqueueFileSystemWatcherEngine::addPaths: open: No such file or directory` to stderr). Why? (Setting a longer `p.waitForFinished period` might do away with this immediate crash because then the `QKqueueFileSystemWatcherEngine::addPaths: open: No such file or directory` is already written to stderr?)
~~With `p.waitForFinished period` set to 10 seconds, then the `ping` command will exit after 10 seconds, and only then show the output of the `ping` command~~ __fixed__ using `p.setProcessChannelMode(QProcess::ForwardedChannels);`
__Once this is solved, set the time back to e.g., 3 seconds rather than 10.__
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Start by reproducing the issue with the `launch` command using `ping`, `qpdf`, and `launch Menu`, focusing on behavior after the `p.waitForFinished` period. Inspect the existing `QProcess::ForwardedChannels` handling and compare stdout/stderr behavior before and after the timeout. Done means launched programs and menu actions remain usable after the timeout, while output is still forwarded and the period can be reduced to about 3 seconds.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp
- Ambito
- cli, desktop
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100