id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	branch_state	votes
1425	External editor won't open if there are spaces in EDITOR variable	andreitch	slavazanko	"If there are spaces in the EDITOR environment variable, mc won't load it.

These first two examples work, but the last ones don't:
{{{
EDITOR=emacs mc
EDITOR=mcedit mc
EDITOR='emacs -nw' mc
EDITOR='mc -e' mc
}}}

I think it's a problem with my_system function (utilunix.c, line 128) when it calls execl and execlp. You can see by running this two little C programs that they don't work. The third one works as expected.

{{{
#include <unistd.h>

int main(int argc, char *argv[])
{
    execlp(""sh"", ""sh"", ""emacs -nw"", (char *)NULL);
    return 0;
}
}}}

{{{
#include <unistd.h>

int main(int argc, char *argv[])
{
    execl(""sh"", ""sh"", ""-c"", ""emacs -nw"", (char *)NULL);
    return 0;
}
}}}

{{{
#include <unistd.h>

int main(int argc, char *argv[])
{
    execlp(""sh"", ""sh"", ""-c"", ""emacs -nw"", (char *)NULL);
    return 0;
}
}}}"	defect	closed	minor	4.7.0-pre2	mcedit	4.6.2	fixed	editor					committed-master
