• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tomasnorre / crawler / 17624281546

10 Sep 2025 07:10PM UTC coverage: 67.575% (-1.2%) from 68.768%
17624281546

Pull #1183

github

web-flow
Merge adbaf6ed2 into 96cae4d2b
Pull Request #1183: [TASK] Refactor ProcessCleanupHook, extract logic to ProcessManager and ProcessCleaner classes

4 of 55 new or added lines in 6 files covered. (7.27%)

17 existing lines in 1 file now uncovered.

1859 of 2751 relevant lines covered (67.58%)

3.18 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/Classes/Process/UnixProcessManager.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace AOE\Crawler\Process;
6

7
/*
8
 * (c) 2025 Tomas Norre Mikkelsen <tomasnorre@gmail.com>
9
 *
10
 * This file is part of the TYPO3 Crawler Extension.
11
 *
12
 * It is free software; you can redistribute it and/or modify it under
13
 * the terms of the GNU General Public License, either version 2
14
 * of the License, or any later version.
15
 *
16
 * For the full copyright and license information, please read the
17
 * LICENSE.txt file that was distributed with this source code.
18
 *
19
 * The TYPO3 project - inspiring people to share!
20
 */
21

22
class UnixProcessManager implements ProcessManagerInterface
23
{
24
    public function processExists(int $pid): bool
25
    {
NEW
26
        return file_exists('/proc/' . $pid);
×
27
    }
28

29
    public function killProcess(int $pid): void
30
    {
NEW
31
        posix_kill($pid, 9);
×
32
    }
33

34
    public function findDispatcherProcesses(): array
35
    {
NEW
36
        $returnArray = [];
×
NEW
37
        if (exec('which ps')) {
×
38
            // ps command is defined
NEW
39
            exec("ps aux | grep 'typo3 crawler:processQueue'", $returnArray);
×
40
        } else {
NEW
41
            trigger_error(
×
NEW
42
                'Crawler is unable to locate the ps command to clean up orphaned crawler processes.',
×
NEW
43
                E_USER_WARNING
×
NEW
44
            );
×
45
        }
46

NEW
47
        return $returnArray;
×
48
    }
49
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc