aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2006-06-13 08:55:22 +0000
committerNathan Sidwell <nathan@codesourcery.com>2006-06-13 08:55:22 +0000
commit5600ea19e0ff645c85a8719648655c2e7b2e4717 (patch)
tree606de62b7a27178ba351bec8d579244edb0c0ac1 /gdb/doc
parente1c2defab5219dd0aa2a64d865e78d9ac736d0ac (diff)
downloadfsf-binutils-gdb-5600ea19e0ff645c85a8719648655c2e7b2e4717.zip
fsf-binutils-gdb-5600ea19e0ff645c85a8719648655c2e7b2e4717.tar.gz
fsf-binutils-gdb-5600ea19e0ff645c85a8719648655c2e7b2e4717.tar.bz2
gdb/
* remote-file.io.c (remote_fileio_func_system): Treat zero length string as NULL. Adjust for NULL pointer argument. * doc/gdb.texinfo (system): Document behaviour with zero length string. gdb/testsuite/ * gdb.base/fileio.c: Add system(NULL) test. * gdb.base/fileio.exp: Check it.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/gdb.texinfo12
1 files changed, 7 insertions, 5 deletions
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 47e8d2c..6935d82 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -24752,11 +24752,13 @@ int system(const char *command);
@samp{Fsystem,@var{commandptr}/@var{len}}
@item Return value:
-The value returned is -1 on error and the return status
-of the command otherwise. Only the exit status of the
-command is returned, which is extracted from the host's
-@code{system} return value by calling @code{WEXITSTATUS(retval)}.
-In case @file{/bin/sh} could not be executed, 127 is returned.
+If @var{len} is zero, the return value indicates whether a shell is
+available. A zero return value indicates a shell is not available.
+For non-zero @var{len}, the value returned is -1 on error and the
+return status of the command otherwise. Only the exit status of the
+command is returned, which is extracted from the host's @code{system}
+return value by calling @code{WEXITSTATUS(retval)}. In case
+@file{/bin/sh} could not be executed, 127 is returned.
@item Errors: