*** nano/files.c Wed Mar 20 23:07:27 2002 --- nano.mod/files.c Thu Mar 21 00:52:45 2002 *************** *** 294,309 **** int forkpid, fd; char *pipefile, *execute; - execute = charalloc(strlen(command) + 24); if ((pipefile = safe_tempnam(0, "nano.")) == NULL) { statusbar(_("Could not create a temporary filename: %s"), strerror(errno)); - free(execute); free(pipefile); return 1; } ! sprintf(execute,"%s 2>&1 > %s",command,pipefile); umask(0); mkfifo(pipefile,0700); forkpid = fork(); --- 294,308 ---- int forkpid, fd; char *pipefile, *execute; if ((pipefile = safe_tempnam(0, "nano.")) == NULL) { statusbar(_("Could not create a temporary filename: %s"), strerror(errno)); free(pipefile); return 1; } + execute = charalloc(strlen(command) + (strlen(pipefile) * 2) + 7); ! sprintf(execute,"%s 2> %s > %s",command,pipefile,pipefile); umask(0); mkfifo(pipefile,0700); forkpid = fork();