You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
941 B
23 lines
941 B
diff -up patch-2.7.1/src/pch.c.orig patch-2.7.1/src/pch.c |
|
--- patch-2.7.1/src/pch.c.orig 2019-09-02 10:01:18.283754723 +0200 |
|
+++ patch-2.7.1/src/pch.c 2019-09-02 10:03:31.742214005 +0200 |
|
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char c |
|
*outname_needs_removal = true; |
|
copy_file (inname, outname, 0, exclusive, instat.st_mode, true); |
|
} |
|
- sprintf (buf, "%s %s%s", editor_program, |
|
- verbosity == VERBOSE ? "" : "- ", |
|
- outname); |
|
fflush (stdout); |
|
|
|
pid = fork(); |
|
@@ -2470,7 +2467,8 @@ do_ed_script (char const *inname, char c |
|
else if (pid == 0) |
|
{ |
|
dup2 (tmpfd, 0); |
|
- execl ("/bin/sh", "sh", "-c", buf, (char *) 0); |
|
+ assert (outname[0] != '!' && outname[0] != '-'); |
|
+ execlp (editor_program, editor_program, "-", outname, (char *) NULL); |
|
_exit (2); |
|
} |
|
else
|
|
|