diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-10 23:06:23 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-10 23:06:23 +0000 |
commit | 1dbf0aa65cb405c1ad04cfce34992f13576a3d44 (patch) | |
tree | 263760ae0a57fcfe4897f5a464a29b026ef73161 | |
parent | 697666a4f68ea2cd163cbba71dd703ee7b8efab5 (diff) | |
download | nuttx-1dbf0aa65cb405c1ad04cfce34992f13576a3d44.tar.gz nuttx-1dbf0aa65cb405c1ad04cfce34992f13576a3d44.tar.bz2 nuttx-1dbf0aa65cb405c1ad04cfce34992f13576a3d44.zip |
Fix problem with initialization of file actions
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5508 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r-- | apps/examples/posix_spawn/spawn_main.c | 4 | ||||
-rw-r--r-- | nuttx/libc/spawn/lib_psfa_init.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/apps/examples/posix_spawn/spawn_main.c b/apps/examples/posix_spawn/spawn_main.c index 3e3a7b1b1..608145232 100644 --- a/apps/examples/posix_spawn/spawn_main.c +++ b/apps/examples/posix_spawn/spawn_main.c @@ -304,6 +304,8 @@ int spawn_main(int argc, char *argv[]) err("ERROR: posix_spawnattr_init failed: %d\n", ret); } + mm_update(&g_mmstep, "after file_action/attr init"); + /* Set up to close stdin (0) and open testdata.txt as the program input */ ret = posix_spawn_file_actions_addclose(&file_actions, 0); @@ -319,6 +321,8 @@ int spawn_main(int argc, char *argv[]) err("ERROR: posix_spawn_file_actions_addopen failed: %d\n", ret); } + mm_update(&g_mmstep, "after adding file_actions"); + /* If the binary loader does not support the PATH variable, then * create the full path to the executable program. Otherwise, * use the relative path so that the binary loader will have to diff --git a/nuttx/libc/spawn/lib_psfa_init.c b/nuttx/libc/spawn/lib_psfa_init.c index cb638d6e7..4e23703ae 100644 --- a/nuttx/libc/spawn/lib_psfa_init.c +++ b/nuttx/libc/spawn/lib_psfa_init.c @@ -65,6 +65,6 @@ int posix_spawn_file_actions_init(FAR posix_spawn_file_actions_t *file_actions) { - file_actions = NULL; + *file_actions = NULL; return OK; } |