Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
None
-
6.5.1
-
-
82b75570f099911076ad0e144927862e8e359fbd (qtbase/dev) b5982b6525c7c24e51e41ba2055c4626d0c2fce3 (qtbase/6.5)
Description
If QProcess is called with non existence command/binary it leaks file descriptor.
void testfn() { QProcess process; process.start("nonexistingcommand"); process.waitForFinished(); process.closeReadChannel(QProcess::StandardOutput); process.closeReadChannel(QProcess::StandardError); process.closeWriteChannel(); process.close(); } int main(int argc, char** argv) { QCoreApplication app(argc, argv); for(int i = 0; i < 10; ++i){ testfn() } return 0; }
When diffing the 'lsof' output between two timepoints, You get following difference:
+lumon 1609604 fery 82w FIFO 0,14 0t0 35522629 pipe +lumon 1609604 fery 83w FIFO 0,14 0t0 35522633 pipe +lumon 1609604 fery 84w FIFO 0,14 0t0 35522637 pipe +lumon 1609604 fery 85w FIFO 0,14 0t0 35522244 pipe +lumon 1609604 fery 86w FIFO 0,14 0t0 35522248 pipe +lumon 1609604 fery 87w FIFO 0,14 0t0 35522252 pipe
Attachments
Issue Links
- relates to
-
QTBUG-111243 [REG: 5->6] pthread functions seem to refer to the parent process in QProcess child setup
-
- Closed
-