Diffusion Baloo 52107a8af3ee

[Extractor] Replace homegrown IO handler with QDataStream, catch HUP

Authored by bruns on Oct 30 2018, 3:45 AM.

Description

[Extractor] Replace homegrown IO handler with QDataStream, catch HUP

Summary:
The handler does not handle partial reads, and most importantly, does
not handle when the pipe from the parent process is closed.

Although this should not happen during normal operation, in case of a
crash the indexer process will receive QSocketNotifier::activated events
due to 'POLLHUP' events from the underlying poll. This causes a busy
loop, as the underlying pipe status is never checked.

May fix a few instances of "100% CPU load" bug reports.

Reviewers: Baloo, Frameworks, ngraham, poboiko, lbeltrame

Reviewed By: lbeltrame

Subscribers: lbeltrame, kde-frameworks-devel

Tags: Frameworks, Baloo

Differential Revision: https://phabricator.kde.org/D16523

Details

Committed
brunsNov 5 2018, 11:10 PM
Reviewer
lbeltrame
Differential Revision
D16523: [Extractor] Replace homegrown IO handler with QDataStream, catch HUP
Parents
R293:834c919a4601: Unbreak build with BUILD_QCH=TRUE
Branches
Unknown
Tags
Unknown