* ser-pipe.c (pipe_open): Use proper null pointer in execl call.

* cli/cli-cmds.c (shell_escape): Likewise.
This commit is contained in:
Mark Kettenis 2004-01-22 22:20:39 +00:00
parent 642d8300fe
commit 36662fde7b
3 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,8 @@
2004-01-22 Mark Kettenis <kettenis@gnu.org>
* ser-pipe.c (pipe_open): Use proper null pointer in execl call.
* cli/cli-cmds.c (shell_escape): Likewise.
* osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Recognize
OpenBSD .note.openbsd.ident sections.

View File

@ -504,9 +504,9 @@ shell_escape (char *arg, int from_tty)
p++; /* Get past '/' */
if (!arg)
execl (user_shell, p, 0);
execl (user_shell, p, (char *) 0);
else
execl (user_shell, p, "-c", arg, 0);
execl (user_shell, p, "-c", arg, (char *) 0);
fprintf_unfiltered (gdb_stderr, "Cannot execute %s: %s\n", user_shell,
safe_strerror (errno));

View File

@ -98,7 +98,7 @@ pipe_open (struct serial *scb, const char *name)
for (old = pidlist; old; old = old->next)
close (fileno (old->fp)); /* don't allow a flush */
#endif
execl ("/bin/sh", "sh", "-c", name, NULL);
execl ("/bin/sh", "sh", "-c", name, (char *) 0);
_exit (127);
}