From c99882a842b5eba353e31fb984c2be23444ade62 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 1 Mar 2011 02:32:50 +0000 Subject: [PATCH] Fix NSH redirection hang git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3326 42af7a65-404d-4744-a932-0658087f49c3 --- Documentation/NuttX.html | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Documentation/NuttX.html b/Documentation/NuttX.html index 52386107a6b..15ee60dae87 100644 --- a/Documentation/NuttX.html +++ b/Documentation/NuttX.html @@ -8,7 +8,7 @@

NuttX RTOS

-

Last Updated: February 27, 2011

+

Last Updated: February 28, 2011

@@ -2087,6 +2087,20 @@ nuttx-5.19 2011-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> * NSH: 'mem' command renamed to 'free'. Output is now more similar to the Linux 'free' command. + * NSH: Correct a redirection bug in NSH. The following would not work; it + resulted in a hang after the 'cat /dev/fifo': + + nsh> mkfile /dev/fifo + nsh> cd /tmp # /tmp is a mounted RAM disk + nsh> cat /dev/fifo > test.txt & + nsh> echo "This is a test" > /dev/fifo + + The error was caused because (1) there was a path that resulted in stdout + being closed (the "hang") and also (2) the 'cat' command was always outputting + to stdout, not to the redirected file descriptor. Now: + + nsh> cat test.txt + This is a test pascal-2.1 2011-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>