diff options
author | Jesse Luehrs <doy@tozt.net> | 2016-05-10 16:03:37 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2016-05-10 16:03:37 -0400 |
commit | 9118ead5ae15548c8a5b96340f9a0a24b3104e32 (patch) | |
tree | 5931f2b6e538cb369e97e2ccfa089615a7415e0a /src/pty-unix.c | |
parent | 082d730944950c202f24d3701878c06cf5e44f5f (diff) | |
download | runes-9118ead5ae15548c8a5b96340f9a0a24b3104e32.tar.gz runes-9118ead5ae15548c8a5b96340f9a0a24b3104e32.zip |
make terms handle cleaning themselves up
Diffstat (limited to 'src/pty-unix.c')
-rw-r--r-- | src/pty-unix.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pty-unix.c b/src/pty-unix.c index 7975964..27419ce 100644 --- a/src/pty-unix.c +++ b/src/pty-unix.c @@ -94,6 +94,8 @@ void runes_pty_backend_spawn_subprocess(RunesTerm *t) fprintf(old_stderr, "Couldn't run %s: %s\n", cmd, strerror(errno)); exit(1); } + + runes_term_refcnt_inc(t); } void runes_pty_backend_init_loop(RunesTerm *t, RunesLoop *loop) @@ -155,7 +157,10 @@ static int runes_pty_backend_got_data(void *t) return 1; } else { + runes_pty_backend_cleanup(pty); + free(pty); runes_window_backend_request_close(t); + runes_term_refcnt_dec(t); return 0; } |