summaryrefslogtreecommitdiffstats
path: root/src/manager-lib/processcontainer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make watchdog kills use a distinct Unix signal and ExitStatusRobert Griebl2025-06-061-9/+31
| | | | | | | | | | | | | By raising an otherwise unused system signal (*), the System UI can now distinguish between crashes, forced kills from the sys-ui and also kills by the watchdog. (*) SIGSTKFLT on Linux x86 and ARM and SIGEMT on Linux MIPS, BSD and QNX. Change-Id: I5cdb9084c1f822c36d24cbb0905479e18a3f1b69 Pick-to: 6.10 Reviewed-by: Dominik Holland <[email protected]>
* Mark security critical files according to QUIP 23Zoltan Gera2025-05-151-0/+1
| | | | | | | Fixes: QTBUG-135747 Pick-to: 6.9 6.8 Change-Id: I3254d2607b6c80d3fec003263a91f0cee4dd69c6 Reviewed-by: Robert Griebl <[email protected]>
* Fix ProcessContainer::setControlGroup not working with cgroups v2Robert Griebl2025-02-171-3/+27
| | | | | | | | | | | cgroups v1 are mostly obsolete by now. Moving processes into v2 cgroups is quite similar to v1, but the whole controller mapping is not needed anymore. Support for v1 will be removed in a future AppMan release. Change-Id: I53e46823bba04b736b7607c23a5a79706bd178ca Pick-to: 6.8 6.9 Reviewed-by: Dominik Holland <[email protected]>
* Disable watchdog when a debug-wrapper is usedRobert Griebl2024-12-021-0/+5
| | | | | | | | | | There might be debug-wrappers that don't interfere with the watchdog, but for most of the debug use cases, disabling the watchdog completely is the better solution. Change-Id: I2d9ce1da1be0b06631091aa46ce793ddb7d7a0b5 Pick-to: 6.8 Reviewed-by: Dominik Holland <[email protected]>
* Modernize string literalsRobert Griebl2024-01-081-6/+9
| | | | | | | | | Replace all our custom qSL/qL1S/qL1C macros with standard C++ and QString unicode string literals. Change-Id: I9e0b69fb46525421f408f260518a69b8f8125d99 Pick-to: 6.7 Reviewed-by: Dominik Holland <[email protected]>
* Port from qAsConst to std::as_constMarc Mutz2023-01-141-1/+1
| | | | | | | | QT_NO_AS_CONST is now globally enabled in qtbase. Pick-to: 6.5 Change-Id: Ifc2eab1c902e75f5dbfc38ef9a62b29b5c91bc61 Reviewed-by: Jörg Bornemann <[email protected]>
* Use SPDX license identifiersDominik Holland2022-06-151-30/+4
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I09660e42dea769d720ff30e652485d9861cea965 Reviewed-by: Robert Griebl <[email protected]>
* Correctly track redirected std. IO file descriptors through all layersRobert Griebl2022-03-301-25/+26
| | | | | | | | | | | | | | | | | | | | | Using redirected IO via the DBus startApplication interface could lead to blocked terminals, due to the forwarded file descriptors not being closed correctly when errors occurred during app startup. We're now using move semantics plus a helper function to make sure that the fd vector always has exactly one owner and that owner is actually closing the descriptors. Changing the public ContainerInterface would be an API break, so fixing this as well is not an option at this time. Meanwhile the documentation clearly states the required ownership transfer. Also added a note that IO redirections do not work for single-process runtimes, when trying to do so via the appman-controller. Change-Id: Id4fa0e53ee61c33a630ca4a8d6d89aea78cc74e7 Fixes: AUTOSUITE-1218 Reviewed-by: Dominik Holland <[email protected]>
* Clazy: fix srcRobert Griebl2021-08-201-0/+1
| | | | | Change-Id: I043882780fac7bed5d9dd75424ede46b54caa187 Reviewed-by: Dominik Holland <[email protected]>
* Update copyright headers to 2021 an finally switch to the GPLRobert Griebl2021-06-011-24/+13
| | | | | | | | | Also removed all the SPDX tags and -QTAS license extensions. Change-Id: Ibd10fe37afcbba832831d027cf2f1891ca0226c0 Fixes: AUTOSUITE-1648 Fixes: AUTOSUITE-1646 Reviewed-by: Dominik Holland <[email protected]>
* Remove legacy functionality: headless, pssdp and pshellserverRobert Griebl2020-11-281-0/+3
| | | | | Change-Id: Iffeaa944cce5d09d0a1d1af2d85aa5f5034b7f71 Reviewed-by: Robert Griebl <[email protected]>
* Qt 6 port, part 1 .. without cmakeRobert Griebl2020-11-281-21/+11
| | | | | | | | | All C++ and QML unit-tests pass. The QML "windowitem" test is very unstable though and often crashes in the RHI layer. Change-Id: Ia42fc71ad69d2ba74b8b631ded7569b48cf458ee Reviewed-by: Robert Griebl <[email protected]>
* Build optimization: include all moc cpps directly in the main cpp fileRobert Griebl2020-08-111-0/+2
| | | | | | | | This is a Qt module policy and helps a lot with build times -- especially on CI setups. Change-Id: I90574deb7e7b215054a5037b99ee4e7c7a040568 Reviewed-by: Thomas Senyk <[email protected]>
* Fix 5.14 warningsRobert Griebl2020-01-221-2/+1
| | | | | Change-Id: Idef31ec5532000c7fdcea5a96b7f28d045213d9a Reviewed-by: Dominik Holland <[email protected]>
* Rename from Luxoft AM to Qt AMRobert Griebl2019-08-051-1/+1
| | | | | | Change-Id: I84bbd9e7f735ed1864804a9887d3a02b7c925e53 Reviewed-by: Vladimir Minenko <[email protected]> Reviewed-by: Bernd Weimer <[email protected]>
* Add new package abstraction, which allows multiple executables per packageRobert Griebl2019-08-011-2/+2
| | | | | | | | This is part 1 which is missing doc updates and missing the update-builtin- applications functionality. Both will be added in a follow-up commit. Change-Id: I2b493cfb7585143962067674690b02cc132ef78b Reviewed-by: Dominik Holland <[email protected]>
* Port benchmark code to new 5.12 APIBernd Weimer2019-03-251-1/+3
| | | | | | | | | | | - Adapted window management and monitoring code to new 5.12 API - Added method to retrieve specific MonitorModel data - Fixed GPU utilization measurement Change-Id: I6b589eae027d0efa2a55046c44c2b1790e2adb37 Reviewed-by: Kavindra Palaraja <[email protected]> Reviewed-by: Dominik Holland <[email protected]> Reviewed-by: Robert Griebl <[email protected]>
* Update copyright statementsRobert Griebl2018-12-181-1/+2
| | | | | | | | - added 2019 - everything is (c) Luxoft instead of Pelagicore from now on Change-Id: I82f874f0b0601deae1bb39347821edaf3c4cc6d8 Reviewed-by: Dominik Holland <[email protected]>
* Fix: software-container plugin is not able to connect to the P2P busRobert Griebl2018-10-121-1/+4
| | | | | | | | | | When we switched to using the $AM_CONFIG yaml snippet as an universal way to move config options to the applications, we forgot to adjust the SC plugin. Also fixed some missing documentation in the container plugin interface. Change-Id: I9db26f674eaf6324d8d15e9f2399b18cf628f9df Reviewed-by: Dominik Holland <[email protected]>
* Add basic iOS support. Fix all "macOS" referencesRobert Griebl2018-08-241-37/+48
| | | | | | | | | This adds the basics to compile all of the AM as well as Neptune-3 for iOS. Actually running everything automatically through QtCreator needs a few more tweaks in qmake/installation rules to correctly deploy. Change-Id: Iaf17594b9944e36510ff47cf15668a12e3a08af6 Reviewed-by: Daniel d'Andrada <[email protected]>
* Get rid of QProcess in the internal and external APIRobert Griebl2018-08-231-5/+12
| | | | | | | | | | | | | | | | Just using whatever enums QProcess already defined seemed like a good idea initially, but this falls short on platforms that do not support QProcess at all (e.g. iOS). Still, removing QProcess enums from header files helps with consolidating 3 different enums that were being used for process state handling. The only downside is, that containerinterface.h needs to duplicate the enum definitions in order to not reply on external header files (we might want to remove that restriction eventually, but this will be a separate patch) Change-Id: I5c79b660127e9ab7196d68dd258c3ec696150520 Reviewed-by: Daniel d'Andrada <[email protected]>
* Refactor the Application objectDaniel d'Andrada2018-05-141-2/+2
| | | | | | | | | | | | | | | | Split the original Application object into two parts: the dynamic and the static one. The dynamic is called Application and lives in the manager lib The static is called ApplicationInfo and lives in the application lib On top of that make a clear distinction between aliases and real application objects, which solves some inconsistencies. Also removed all deprecated properties from the original Application object Task-number: AUTOSUITE-296 Change-Id: I8354c9d50f14d083cb85c19153dd19c933eae660 Reviewed-by: Robert Griebl <[email protected]>
* Preserve the PID of apps when they crash for better error outputRobert Griebl2018-02-201-2/+6
| | | | | | Task-number: QTAUTO-515 Change-Id: I039199d6bc3cd4964c692dd3448c6d17b3c29998 Reviewed-by: Dominik Holland <[email protected]>
* Update Pelagicore copyright headers to 2018Robert Griebl2018-02-071-1/+1
| | | | | Change-Id: I8d9278053ccdef5a57e51753aa6157941ebcee52 Reviewed-by: Dominik Holland <[email protected]>
* Replace debug-wrapper specifications with more powerful syntaxRobert Griebl2017-07-051-9/+28
| | | | | | | | | | | | Pre-defining the wrappers in a config file turned out to be too inflexible for everyday use, so wrapper specifications are now direct shell commands with placeholders (e.g. "valgrind --tool=helgrind %program%"). In addition, these command also support specifying environment variable, just as you would do on the command line (e.g. "QT_DEBUG_PLUGINS=1 strace") Change-Id: I1509a9fefd01c778e2fb6c5b87f811ec9571a946 Reviewed-by: Dominik Holland <[email protected]>
* Move all monitor related classes to the monitor-libNedim Hadzic2017-04-251-1/+1
| | | | | | | | | | * Created new monitor-lib * Removed dependencies from window and other libs towards monitor classes. Monitor classes should depend on manager and window lib. Change-Id: Ie6f7a82b3a22808eb7414251c996072e47fd2687 Reviewed-by: Bernd Weimer <[email protected]>
* Fix crash on shutdownRobert Griebl2017-03-281-0/+5
| | | | | | | | | | The QProcess d'tor does emit the finished signal when it kills its process, but that would lead to slots being called in AM objects that are already dead or currently being destructed. The workaround is to ignore those QProcess signals on shutdown. Change-Id: I2bb31a6a9c1d5c7581baea84a8494b2f3652920e Reviewed-by: Dominik Holland <[email protected]>
* common-lib cleanupRobert Griebl2017-03-131-0/+1
| | | | | | | | | | global.{h,cpp} and utilities.{h,cpp} have become the kitchensink of the AM. This commit splits out the logging functionality from global.{h,cpp} into the new files logging.{h,cpp} and also the crash handling functionality from utilities.{h,cpp} into the new crashhandler.{h,cpp} Change-Id: Idffdb424b1cbd8d92eb60b0ac7f08e17a46c749b Reviewed-by: Dominik Holland <[email protected]>
* Code and debug output cleanup for application startsRobert Griebl2017-02-231-1/+1
| | | | | | | | This reduces the amount of cryptic output when starting applications in Wayland mode. Change-Id: I0b49b27e8b3322cfe77b1a086b400a0814af8774 Reviewed-by: Dominik Holland <[email protected]>
* Added support for debug-wrappers and io redirection to container pluginsRobert Griebl2017-02-201-26/+15
| | | | | | | | Simplified the debug-wrapper API in AbstractContainer, so that we can avoid exposing internal data structures to plugins. Change-Id: I8e20a2b9ab8ef141c9f83ee13fad5fe202e8987e Reviewed-by: Dominik Holland <[email protected]>
* Updated Pelagicore AG copyright to 2017Robert Griebl2017-01-161-1/+1
| | | | | | | Also added a few pro file tweaks to make this search&replace easier next year. Change-Id: I2d1153d62bfe558075009abcd8cad491f149c93f Reviewed-by: Dominik Holland <[email protected]>
* Fixed stdin/out/err redirected file-descriptor handlingRobert Griebl2017-01-111-11/+27
| | | | | | | | | These file-descriptors were not properly closed, which led to hangs in the appman-controller when executed via ssh or adb, since the appman process still held a reference to the tty. Change-Id: Ic3bcc1c2a24ec39c1a56f66f3359040ce42cb0bc Reviewed-by: Wolfgang Bremer <[email protected]>
* Extended the container interface to make it aware of the app it is executingRobert Griebl2016-12-201-8/+9
| | | | | | | | This is needed for any container solution that needs to map a minimal amount of filesystem directories into the container. Change-Id: Ie6082e8427f1fb3b3068b0a912584d2cc736f63b Reviewed-by: Bernd Weimer <[email protected]>
* Emit application specific memory warningsBernd Weimer2016-12-151-0/+12
| | | | | | | | | | | | | When an application (process) has been moved into a memory controlling cgroup and the application exceeded its allotted memory, it simply got killed by the kernel. This is still the case, but the application will additionally get informed beforehand when memory is getting low and critical. The thresholds for these warnings are currently predefined to default values (75/90%). Fixed system wide memory low and critical warnings, as well. Change-Id: I2426c04a4ed5958a35ac07fb70e6ed7c2bb83ead Reviewed-by: Robert Griebl <[email protected]>
* Make the build warning freeRobert Griebl2016-10-191-2/+2
| | | | | | | | | Replaced all AM_*_NAMESPACE with the undocumented QT_*_NAMESPACE_<foo> mechanism. Add dummy "we mean it" comments to _p.h headers, even though all of the AM's C++ API is private anyway. Change-Id: I45c1b7490f3d519e79350a19dab129ad20623d92 Reviewed-by: Thomas Senyk <[email protected]>
* Another round of fixing clazy findingsRobert Griebl2016-09-231-1/+1
| | | | | | Change-Id: Ic6c92bca265b3cd0fa55cea068633483d8c4d9ea Reviewed-by: Bernd Weimer <[email protected]> Reviewed-by: Dominik Holland <[email protected]>
* Moved all symbols to a private namespaceRobert Griebl2016-09-231-0/+4
| | | | | | | | | This was done to avoid conflicts with C++ plugins that get loaded into both the system-ui or the QML app runtime. Change-Id: I03fc222d806292f0f0734709568514862b6da56d Reviewed-by: Bernd Weimer <[email protected]> Reviewed-by: Dominik Holland <[email protected]>
* Added support for stdin/-out/-err redirection to the debug wrappersRobert Griebl2016-08-301-28/+49
| | | | | | | | This can be used by passing the new --attach-stdin (-stdout/-stderr) parameters to "appman-controller debug-application" Change-Id: Iced5be51cc7150bd93cdcece7cc36346c889d8ee Reviewed-by: Dominik Holland <[email protected]>
* Added a plugin mechanism - currently for startup and containersRobert Griebl2016-08-231-1/+5
| | | | | | | | | This adds a way to influence the startup and add custom container solutions via a standard Qt plugin interface. Which plugins are loaded is specified in the config file. Change-Id: I73af43bfbb21aa7a15c7c799f795e10065d225b8 Reviewed-by: Dominik Holland <[email protected]>
* Added support for 'debug wrappers' (gdbserver, valgrind, etc.)Robert Griebl2016-08-101-4/+31
| | | | | | | | These are configured in the main config file. Starting an app via a wrapper is accomplished with the new debugApplication() QML/D-Bus call. Change-Id: I5420073ac7329a0cfe890e2ba0db3977356d5466 Reviewed-by: Dominik Holland <[email protected]>
* Added console color output support when running inside QtCreatorRobert Griebl2016-08-101-0/+1
| | | | | Change-Id: I22fbe60c9cc3e12b45bd74a4109e6ef51c279276 Reviewed-by: Dominik Holland <[email protected]>
* Made it possible to specify $QT_IM_MODULES for applicationsRobert Griebl2016-07-141-4/+3
| | | | | Change-Id: I749e942732ad06c72eda1507af9045d773c6ef32 Reviewed-by: Dominik Holland <[email protected]>
* Another round of fixes for clazy warnings.Robert Griebl2016-06-211-1/+1
| | | | | Change-Id: I21b02e1c5b1606c01c8d46e64c9731916eb28c94 Reviewed-by: Dominik Holland <[email protected]>
* Added cgroup support to the default process container solution.Robert Griebl2016-06-091-0/+46
| | | | | | | | | Also extended the QML API of the ApplicationManager singleton to make it possible to get fast and direct access to the underlying Application, Runtime and Container objects. Change-Id: I324c3a59dbd5d6b6497cc532daeb30211e706f1d Reviewed-by: Dominik Holland <[email protected]>
* Fixed license header to align with the final QtAS contract.Robert Griebl2016-06-021-6/+16
| | | | | | | | | | | The AppMan is triple-licensed now, like the rest of Qt: commercial, LGPL3 and GPL2/3 To be more aligned with Qt, the docs are also FDL and the tests, as well as the tools are GPL-EXCEPT now. Change-Id: Ib0168a112c3bcd340576f92416a6fe36fa315240 Reviewed-by: Dominik Holland <[email protected]>
* Add support for virtual keyboardJan Arne Petersen2016-04-181-0/+2
| | | | | | | | Allows to use a virtual keyboard in the compositor which communicates with the applications via wayland text-input protocol. Change-Id: I2aac541e7a7f61ab53d0b2d200721b043d8cf36e Reviewed-by: Dominik Holland <[email protected]>
* Use the same license wording for GPL3 as the standard Qt 5.7 license.Robert Griebl2016-04-111-13/+14
| | | | | Change-Id: I0f8cb01cd1239bf70434f3b39392a1464c32620e Reviewed-by: Dominik Holland <[email protected]>
* Updated copyright year to 2016Robert Griebl2016-03-171-1/+1
| | | | | Change-Id: I2630c098272ec75bed0333d7eab0610c0c621893 Reviewed-by: Robert Griebl <[email protected]>
* Added configurability via YAML to the containers sub-system.Robert Griebl2016-03-161-0/+22
| | | | | | | | | | The setup is exactly the same as for the runtimes. The only supported config option right now is containers/process/stopBeforeExec = yes which will send a SIGSTOP to newly created application process. This way is it possible to attach a debugger before exec(). Change-Id: I8d94923fd02c202818db355869f6783557d29b6c Reviewed-by: Thomas Senyk <[email protected]>
* Fixed all relevant clazy warnings - especially QString related ones.Robert Griebl2016-01-141-1/+1
| | | | | | | | | | | | Most error strings have not been converted to QStringLiterals on purpose: It's a better tradeoff here to use half the space and take a "performance hit" when running into an (unlikely) error condition. Please note that still no version of MSVC is able to cope with concatenated string literals: http://blog.qt.io/blog/2014/06/13/qt-weekly-13-qstringliteral Change-Id: Ife5f5841de121da75838ae9dbb67909a5816768e Reviewed-by: Dominik Holland <[email protected]>