Closed LemonBoy closed 12 years ago
a non-existent command as part of the .com
, like:
static const char *fakecmd[] = { "fakecmd", NULL };
[...]
{ MOD4, XK_f, spawn, {.com = fakecmd}},
should just result in:
monsterwm: execvp fakecmd: No such file or directory
on the other hand, a non-existent command as part of the function should be caught in the compilation process, like
$ cat config.h
[...]
{ MOD4, XK_e, fake, {NULL}},
[...]
$ make
[...]
config.h:92:41: error: ‘fake’ undeclared here (not in a function)
[...] // many warnings for config.h missing initializer
make: *** [monsterwm.o] Error 1
So what are you doing that causes a segfault ? or what do you mean by non-existent command ?
I have the command 'urxvt -e newsbeuter' bind to a key but newsbeuter isn't installed. Urxvt exits gracefully but somehow when spawned by monsterwm it makes the whole thing segfault.
@LemonBoy, can you show your execution line? make sure you do 'urxvt', '-e', 'newsbeuter' I launch stuff with urxvt same way and it works fine.
doesn't seem to affect it here, using
static const char *fakecmd[] = { "urxvt", "-e", "newsbeuter", NULL };
[...]
{ MOD4, XK_f, spawn, {.com = fakecmd}},
[...]
urxvt spawns for a split second, and exits immediately, as newsbeuter
fails to start
no segfault though, everything is normal.
static const char *newscmd[] = { "urxvt", "-name" , "news" , "-e", "newsbeuter" , NULL };
[...]
{ MOD1|SHIFT, XK_n, spawn, {.com = newscmd}},
[...]
Same as you, i guess the bug is somewhere else then.
same thing as before, urxvt spawns for a split second, and exits immediately, as the command passed to -e
fails to start
I dont see why it would segfault.
could you give me the output of this just in case:
$ ls -l $(which cc)
$ cc --version
I use gcc 4.7.0 here
Same gcc version, I'm on arch too.
ah! found it :D You need to have a rule set for that app, and it should spawn on another empty desktop. If you're on the desktop that the app will be spawned, then there's no problem. I'll see what I can do about it.
The title says it all, don't have much time to check myself where this happens but i guess it's after the forking happens.