job: Replace by a better process abstraction layer

- New libuv/pty process abstraction with simplified API and no globals.
- Remove nvim/os/job*. Jobs are now a concept that apply only to programs
  spawned by vimscript job* functions.
- Refactor shell.c/channel.c to use the new module, which brings a number of
  advantages:
  - Simplified API, less code
  - No slots in the user job table are used
  - Not possible to acidentally receive data from vimscript
- Implement job table in eval.c, which is now a hash table with unilimited job
  slots and unique job ids.
This commit is contained in:
Thiago de Arruda
2015-07-17 00:32:07 -03:00
parent 9d8d2b7fa8
commit aa9cb48bf0
21 changed files with 791 additions and 1016 deletions

View File

@@ -63,7 +63,7 @@
#include "nvim/os/time.h"
#include "nvim/event/loop.h"
#include "nvim/os/signal.h"
#include "nvim/os/job.h"
#include "nvim/event/process.h"
#include "nvim/msgpack_rpc/defs.h"
#include "nvim/msgpack_rpc/helpers.h"
#include "nvim/msgpack_rpc/server.h"
@@ -149,7 +149,6 @@ void event_init(void)
// `event_poll`
// Signals
signal_init();
job_init();
// finish mspgack-rpc initialization
channel_init();
server_init();
@@ -165,7 +164,7 @@ void event_teardown(void)
loop_process_all_events(&loop);
input_stop();
channel_teardown();
job_teardown();
process_teardown(&loop);
server_teardown();
signal_teardown();
terminal_teardown();