Commit 20c018a0 authored by Jim Blandy's avatar Jim Blandy
Browse files

* callproc.c (relocate_fd): Make messages string literals, not

	initialized arrays.
parent 5c4f68f1
...@@ -529,12 +529,11 @@ relocate_fd (fd, min) ...@@ -529,12 +529,11 @@ relocate_fd (fd, min)
int new = dup (fd); int new = dup (fd);
if (new == -1) if (new == -1)
{ {
char message1[] = char *message1 = "Error while setting up child: ";
"Error while setting up child: "; char *message2 = "\n";
char message2[] = "\n"; write (2, message1, strlen (message1));
write (2, message1, sizeof (message1) - 1);
write (2, sys_errlist[errno], strlen (sys_errlist[errno])); write (2, sys_errlist[errno], strlen (sys_errlist[errno]));
write (2, message2, sizeof (message2) - 1); write (2, message2, strlen (message2));
_exit (1); _exit (1);
} }
/* Note that we hold the original FD open while we recurse, /* Note that we hold the original FD open while we recurse,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment