MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / doClose

Method doClose

app/src/IO/Drivers/Process.cpp:93–110  ·  view source on GitHub ↗

* @brief Non-virtual cleanup implementation shared by close() and ~Process(). */

Source from the content-addressed store, hash-verified

91 * @brief Non-virtual cleanup implementation shared by close() and ~Process().
92 */
93void IO::Drivers::Process::doClose()
94{
95 if (m_process) {
96 m_process->disconnect();
97 m_process->terminate();
98 if (!m_process->waitForFinished(2000))
99 m_process->kill();
100
101 m_process->deleteLater();
102 m_process = nullptr;
103 }
104
105 m_pipeRunning = false;
106 if (m_pipeThread.isRunning()) {
107 m_pipeThread.quit();
108 m_pipeThread.wait();
109 }
110}
111
112/**
113 * @brief Returns true when the process or pipe channel is open.

Callers

nothing calls this directly

Calls 3

waitMethod · 0.80
disconnectMethod · 0.45
killMethod · 0.45

Tested by

no test coverage detected