]> git.lyx.org Git - lyx.git/blobdiff - src/support/syscall.C
small changes read ChangeLog
[lyx.git] / src / support / syscall.C
index 5795aea81e9de1a7becbd5574598e3f85999c219..8086ab73b2af2bf511406455bebe0e12666a68a1 100644 (file)
@@ -151,15 +151,19 @@ pid_t Systemcalls::fork()
                int  index = 0;
                bool more;
                do {
+                       childcommand = frontStrip(childcommand);
                        if (syscmd == 0) {
                                syscmd = new char[childcommand.length() + 1];
                                childcommand.copy(syscmd, childcommand.length());
                                syscmd[childcommand.length()] = '\0';
                        }
+                       if (!childcommand.empty()) {
                        char * tmp = new char[childcommand.length() + 1];
                        childcommand.copy(tmp, childcommand.length());
                        tmp[childcommand.length()] = '\0';
                        argv[index++] = tmp;
+                       }
+                       
                        // reinit
                        more = !rest.empty();
                        if (more)