diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-14 15:42:03 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-14 15:42:03 +0000 |
commit | f3c15e2b0508635898c2c0fcf1564394d8aa8cfc (patch) | |
tree | bc136f7b1fa5989900d1b0e856571e51d96998dc /apps/examples | |
parent | 0191f2d9e4a4c9857ee37655dd3da523cf74a48a (diff) | |
download | px4-nuttx-f3c15e2b0508635898c2c0fcf1564394d8aa8cfc.tar.gz px4-nuttx-f3c15e2b0508635898c2c0fcf1564394d8aa8cfc.tar.bz2 px4-nuttx-f3c15e2b0508635898c2c0fcf1564394d8aa8cfc.zip |
Add support for dup2'ing files. Infrastructure and ROMFS done. Still need FAT, BINFS, NXFFS, and NFS
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5516 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples')
-rw-r--r-- | apps/examples/posix_spawn/spawn_main.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/apps/examples/posix_spawn/spawn_main.c b/apps/examples/posix_spawn/spawn_main.c index 1506fe499..0ca5f9107 100644 --- a/apps/examples/posix_spawn/spawn_main.c +++ b/apps/examples/posix_spawn/spawn_main.c @@ -89,15 +89,6 @@ # error "You must not disable loadable modules via CONFIG_BINFMT_DISABLE in your configuration file" #endif -/* The redirection test does not work. This is because it tries to redirect - * file as stdin. That won't work now because (1) the file descriptors must - * be dup'ed when the new task is created, and (2) there is no support in - * place for dup'ing file descriptors for anything other than sockets and - * character drivers. This is a bug! - */ - -#define FILE_DUP_BUG 1 - /* Describe the ROMFS file system */ #define SECTORSIZE 512 @@ -147,9 +138,7 @@ static unsigned int g_mmstep; /* Memory Usage at beginning of test step */ static const char delimiter[] = "****************************************************************************"; -#ifndef FILE_DUP_BUG static const char g_redirect[] = "redirect"; -#endif static const char g_hello[] = "hello"; static const char g_data[] = "testdata.txt"; @@ -375,8 +364,6 @@ int spawn_main(int argc, char *argv[]) * Case 2: Simple program with redirection of stdin to a file input *************************************************************************/ -#ifndef FILE_DUP_BUG - /* Output a seperated so that we can clearly discriminate the output of * this program from the others. */ @@ -463,7 +450,6 @@ int spawn_main(int argc, char *argv[]) posix_spawnattr_dump(&attr); mm_update(&g_mmstep, "after file_action/attr destruction"); -#endif /* Clean-up */ |