summaryrefslogtreecommitdiffstats
path: root/src/afm-urun.c
AgeCommit message (Collapse)AuthorFilesLines
2020-05-19Improve use of systemd's statesJosé Bollo1-20/+37
A better handling of systemd state is need to treat correctly transient states. That change includes: - Management of states with numeric identifiers instead of names - Handling of the state "inactive" as a stable state. Most of previous seen problems were coming from that miss. - Returning no error but also no info on the process if it falled to "inactive" meaning that it stopped quickly. Bug-AGL: SPEC-3323 Change-Id: Ibf35eb6257c5583596d675cad0bec2869f5fd5f7 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2020-05-06afm-urun: Fix infinite loop on start statusJosé Bollo1-3/+6
Ensure that there is no infinite loop when waiting for the completion of a status. Bug-AGL: SPEC-3323 Change-Id: I93537e9bbbe8ef357d112bea1cb6201e96d01ebf Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2020-01-08Update copyrightJosé Bollo1-1/+1
Change-Id: I1d68e07563d9f0f139d1bc8128e09a5da0a648af Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-03-21Add ability to manage all widget/applicationsJosé Bollo1-3/+3
For system uses -like automatic testing-, it is needed to include tha ability to list ALL installed widgets and ALL running instance of installed widgets. This change adds the option -a or --all to the commands 'list' and 'runners' for the purpose of listing any installed widgets, even those requiring to be hidden. Example: afm-util ps -a Bug-AGL: SPEC-2272 Bug-AGL: SPEC-1850 Change-Id: I216ec9c63efea1b3af58e1d2d7723d986e04551e Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-02-07Update date in copyrightssandbox/scottrif29/scottdocsJosé Bollo1-1/+1
Change-Id: Ie2ff321f78c59913373e2ffb2820297fd423d6f4 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-11-05Treat correctly running/not running statusJosé Bollo1-2/+6
Systemd returns 0 for services that don't run. It wasn't checked well causing weird effect: trying to terminate an application not running killed afm-system-daemon because kill(0) kills all processes of the group of the caller. Bug-AGL: SPEC-1836 Change-Id: I1bd64faf871ecd42aaaa5449312e8b8cb26ee9dd Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-10-28afm-urun: Force scan of systemd unitsJosé Bollo1-13/+7
It was previously assumed that only launched units had to be scanned. But it was buggy because the uninstall/install of application rebuilds the database without taking care of the running applications. Nevertheless changing the behaviour of the rebuild of application's database is not the best solution for two reasons. The fist is that it will complicates the code. The second, much better, is that it would allow to track also applications launched automaticaly -and/or manually in devel-. Bug-AGL: SPEC-1836 Change-Id: I5fb2bb712ce43be9c851251be6b794a007b1ea6f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-28Update date of copyright noticesJosé Bollo1-1/+1
Change-Id: Ia4ef2a6e3c07616ccd756933a82f0806844c4faf Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-01-19afm-binding: Allow use of appid instead of runidJosé Bollo1-0/+23
This facility avoid the double call 'ps', 'kill' and allow a single call to 'kill' with the application id. Bug-AGL: SPEC-1189 Change-Id: I71861c06847e855b05dc8294ab1ea6785f555416 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-24bug fixes and improvementsJosé Bollo1-6/+6
Change-Id: I2fc3de0a84e471e8e87f43170c20f8d6d0d05fdc Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-24urun/udb: integration of user UIDJosé Bollo1-23/+85
Managing user applications at the system levels requires to manage the user application in a single process. This process must manage the user identity (UID). Change-Id: I1ce8c9ca66ed0f916ecb2931ae014b08b113fa23 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-24Start user units at the system levelJosé Bollo1-5/+11
When service name end with @ it means that the user UID must be provided. Change-Id: I6707df0151b7cab985cfc53a81fccf6a7150c9a3 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-07-11Don't list terminated processesJosé Bollo1-7/+8
Listing processes that are terminated might be disturbing. So it is now removed. In some future, it should be good to return on option even terminated processes with an indication of their termination status. Bug-AGL: SPEC-728 Change-Id: I6d5c892bc5e618830cb41de7d664c2443525af96 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-04-03Handle systemd's "inactive" state as transientJosé Bollo1-1/+1
Inactive is returned sometimes but it means that the service is not started yet not that it failed to start. AGL-Issue: SPEC-520 Change-Id: I3b39b983b45a0f6ee449958100595c5c486cbfdd Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-17utils-systemd: implement start/stop of unitsx-first-with-systemdJosé Bollo1-0/+357
This implementation is very basic and must be improved. Change-Id: Id1540e646c83285c61849092bbd8fb645c0954ed Signed-off-by: José Bollo <jose.bollo@iot.bzh>