diff options
Diffstat (limited to 'test/use_append_chunk.c')
-rw-r--r-- | test/use_append_chunk.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/use_append_chunk.c b/test/use_append_chunk.c index 2ec645e..a3219c2 100644 --- a/test/use_append_chunk.c +++ b/test/use_append_chunk.c @@ -118,12 +118,19 @@ main(int argc, char *argv[]) int child_wait_option=0; int ret_value = 0; int child_ret_value; + hbool_t send_wait = 0; /* initialization */ if (setup_parameters(argc, argv) < 0){ Hgoto_error(1); } + /* Determine the need to send/wait message file*/ + if(UC_opts.launch == UC_READWRITE) { + HDunlink(WRITER_MESSAGE); + send_wait = 1; + } + /* ==============================================================*/ /* UC_READWRITE: create datafile, launch both reader and writer. */ /* UC_WRITER: create datafile, skip reader, launch writer. */ @@ -157,7 +164,7 @@ main(int argc, char *argv[]) /* child process launch the reader */ if(0 == childpid) { printf("%d: launch reader process\n", mypid); - if (read_uc_file() < 0){ + if (read_uc_file(send_wait) < 0){ fprintf(stderr, "read_uc_file encountered error\n"); exit(1); } @@ -170,7 +177,7 @@ main(int argc, char *argv[]) /* ============= */ /* this process continues to launch the writer */ printf("%d: continue as the writer process\n", mypid); - if (write_uc_file() < 0){ + if (write_uc_file(send_wait) < 0){ fprintf(stderr, "write_uc_file encountered error\n"); Hgoto_error(1); } |