Mercurial > emacs
comparison src/sysdep.c @ 59937:89e653e08ed9
(sys_subshell): Properly terminate execlp argument list.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Sat, 05 Feb 2005 19:40:04 +0000 |
parents | 59945307b86b |
children | 32504a982bfc 89ac10c67e45 72cf6261961e |
comparison
equal
deleted
inserted
replaced
59936:688b6f973ed9 | 59937:89e653e08ed9 |
---|---|
1 /* Interfaces to system-dependent kernel and library entries. | 1 /* Interfaces to system-dependent kernel and library entries. |
2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1999, 2000, 2001, | 2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1999, 2000, 2001, |
3 2003, 2004 Free Software Foundation, Inc. | 3 2003, 2004, 2005 Free Software Foundation, Inc. |
4 | 4 |
5 This file is part of GNU Emacs. | 5 This file is part of GNU Emacs. |
6 | 6 |
7 GNU Emacs is free software; you can redistribute it and/or modify | 7 GNU Emacs is free software; you can redistribute it and/or modify |
8 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
867 pid = _spawnlp (_P_WAIT, sh, sh, NULL); | 867 pid = _spawnlp (_P_WAIT, sh, sh, NULL); |
868 chdir (oldwd); | 868 chdir (oldwd); |
869 if (pid == -1) | 869 if (pid == -1) |
870 write (1, "Can't execute subshell", 22); | 870 write (1, "Can't execute subshell", 22); |
871 #else /* not WINDOWSNT */ | 871 #else /* not WINDOWSNT */ |
872 execlp (sh, sh, 0); | 872 execlp (sh, sh, (char *) 0); |
873 write (1, "Can't execute subshell", 22); | 873 write (1, "Can't execute subshell", 22); |
874 _exit (1); | 874 _exit (1); |
875 #endif /* not WINDOWSNT */ | 875 #endif /* not WINDOWSNT */ |
876 #endif /* not MSDOS */ | 876 #endif /* not MSDOS */ |
877 } | 877 } |