Commit Graph

12 Commits

Author SHA1 Message Date
Jan Kiszka
dd04836896 Ignore SIGINT/TERM at kas level, let sub-processes handle it
This seems to be the cleanest and simplest way of properly terminating
kas while one or more sub-processes are running: just ignore the signal.
The sub-processes will get it as well, and they will terminate
themselves properly. kas will get an error then and shut down. Problem
solved.

Forwarding the signal didn't work reliably anyway because we couldn't
count on kas being a process group leader in all cases.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2017-07-06 09:05:52 +02:00
Jan Kiszka
7248d5e1bb Fix termination steps
Another, hopefully better attempt: Ignore the TERM signal in the sending
process so that we can properly clean up all the futures before actually
closing. This also avoids a "Terminated" message even on regular kas
endings.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2017-06-29 09:09:50 +02:00
Jan Kiszka
e63d64e77d Fix pylint warning about unused paramater
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2017-06-28 15:14:45 +02:00
Claudius Heine
115625c8fb Added and fixed documentation for kas command line
Documentation for the 'build' and 'shell' command line were missing.
Also fixed kas command line documentation mentioning 'ebs-yocto'.

Signed-off-by: Claudius Heine <ch@denx.de>
2017-06-28 15:12:15 +02:00
Claudius Heine
503fd3d47a Seperated argument parser creation from main kas entry point
With Sphinx it is possible to create the command line documentation
automatically if there is a function that returns just the command line
parser.

Currently the creation of the argument parser is rather entangled with
the rest of kas. This patches seperates this.

Signed-off-by: Claudius Heine <ch@denx.de>
2017-06-28 15:12:15 +02:00
Jan Kiszka
e9feb07567 Install SIGINT/TERM handler for backtrace-free CTRL-C
This just avoids dumping a trace in case of CTRL-C.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2017-06-28 14:51:29 +02:00
Jan Kiszka
94555bb892 libkas: Do not close event loop after each command
Rather close the loop when terminating the kas process.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2017-06-28 14:51:29 +02:00
Jan Kiszka
34cf6900ca Terminate process group when terminating kas
This addresses the case that someone calls sys.exit() while some
processes are still running.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2017-06-28 14:51:29 +02:00
Claudius Heine
33a21c8d0d run pylint3 and fixed report
This commit adds a pylint configuration and fixed all found issues.

Signed-off-by: Claudius Heine <ch@denx.de>
2017-06-21 17:30:51 +02:00
Claudius Heine
4df59537ba Make __version__ available in the whole module
This shortens the include from "from .__version__ import __version__"
to "from . import __version__" within the module.

Signed-off-by: Claudius Heine <ch@denx.de>
2017-06-19 12:26:08 +02:00
Jan Kiszka
7b83fd40b8 Print help if no arguments are provided
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2017-06-19 10:04:22 +02:00
Daniel Wagner
daf0abab5e Initial public release
This is the first public release of kas.

Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
2017-06-14 15:21:19 +02:00