4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-23 00:59:51 +08:00

libgloss/

* m68k/bdm-system.c (_system): Support system(NULL).
This commit is contained in:
Nathan Sidwell 2006-06-09 20:31:19 +00:00
parent c4f65466b9
commit 9205d8c99b
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2006-06-09 Nathan Sidwell <nathan@codesourcery.com>
libgloss/
* m68k/bdm-system.c (_system): Support system(NULL).
2006-06-09 Sandra Loosemore <sandra@codesourcery.com>
* newlib/libc/sys/arm/syscalls.c (_unlink, isatty, _system, _rename):

View File

@ -36,11 +36,11 @@ int _system (const char *command)
gdb_parambuf_t parameters;
parameters[0] = (uint32_t) command;
parameters[1] = (uint32_t) strlen (command) + 1;
parameters[1] = command ? (uint32_t) strlen (command) + 1 : 0;
BDM_TRAP (BDM_SYSTEM, (uint32_t)parameters);
errno = convert_from_gdb_errno (parameters[1]);
e = parameters[0];
if (e >= 0)
if (e >= 0 && command)
{
/* We have to convert e, an exit status to the encoded status of
the command. To avoid hard coding the exit status, we simply