eldiablo /
GallaFrancesco on 10 Jun 629 bytes comments + readme

Remote call process-spawning server

Requires: python, twisted, a client capable of understanding JSON.

Accepted client requests

Only two, based on the "cmd" field of the sent JSON.

Spawn a process

Example JSON: {"cmd": "spawn", "data": "ls -a"}

Returns: a json with status "LAUNCHED" and the process "pid".

2. Query for process status

Example JSON: {"cmd": "status", "data": 16895} Where 16895 is the process pid obtained with [#1][#spawn-a-process].

Returns: a JSON with: status, pid, stdout, stderr, exitcode if process has terminated.


$ python3 -p [TCP PORT]