diff options
author | Karel Kočí <cynerd@email.cz> | 2019-09-30 11:21:23 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2019-09-30 11:21:23 +0200 |
commit | 21748fee311831e06da6f724d418e1b9dd94c1aa (patch) | |
tree | 960efce0a93f9e55ee86f435264ccc0d2244b4ad | |
parent | e9bbc58fe1b54567738bc2720cd0332feb9ff3e2 (diff) | |
download | surf-21748fee311831e06da6f724d418e1b9dd94c1aa.tar.gz surf-21748fee311831e06da6f724d418e1b9dd94c1aa.tar.bz2 surf-21748fee311831e06da6f724d418e1b9dd94c1aa.zip |
Simplify spawn to use more approproate GLib functionv2.0.9
-rw-r--r-- | surf.c | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -1037,17 +1037,7 @@ newwindow(Client *c, const Arg *a, int noembed) void spawn(Client *c, const Arg *a) { - if (fork() == 0) { - if (dpy) - close(ConnectionNumber(dpy)); - close(pipein[0]); - close(pipeout[1]); - setsid(); - execvp(((char **)a->v)[0], (char **)a->v); - fprintf(stderr, "%s: execvp %s", argv0, ((char **)a->v)[0]); - perror(" failed"); - exit(1); - } + g_spawn_async(NULL, (const gchar* const *)a->v, NULL, G_SPAWN_DEFAULT, NULL, NULL, NULL, NULL); } void |