myadm

Simple MySQL client for the terminal
git clone git://git.bitsmanent.org/myadm
Log | Files | Refs | README | LICENSE

commit 3b509bb7bad40a8ad19ffae3520debd61b213f13
parent 016d23e22b61eadcedf8b2f528ba2681b3e369c0
Author: Claudio Alessi <smoppy@gmail.com>
Date:   Mon, 25 Apr 2016 18:31:58 +0200

Handle spawn on the same control tty.

Diffstat:
Mmyadm.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/myadm.c b/myadm.c @@ -302,10 +302,10 @@ editbuf(char *in, int len, int *sz) { unlink(tmp); return NULL; } + ui_end(); spawn(&a); - wait(NULL); - curs_set(1); curs_set(0); /* XXX Investigate... */ - ui_redraw(); + while(wait(NULL) == -1); + ui_init(); buf = fget(tmp, sz); unlink(tmp); return buf; @@ -713,7 +713,7 @@ setup(void) { void spawn(const Arg *arg) { if(!fork()) { - setsid(); + //setsid(); execvp(((char **)arg->v)[0], (char **)arg->v); fprintf(stderr, "myadm: execvp %s", ((char **)arg->v)[0]); perror(" failed");