summaryrefslogtreecommitdiffstats
path: root/test/accum.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2019-10-03 18:30:41 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2019-10-03 21:01:40 (GMT)
commitbbc1264ea67f93eabe53c7b555933072231e108d (patch)
tree9dd855b9bda8130d1710f82d239c7aa5cf25c421 /test/accum.c
parent7bb8d071c6b4b6fecc84eda4982cab6b86f9ff04 (diff)
downloadhdf5-bbc1264ea67f93eabe53c7b555933072231e108d.zip
hdf5-bbc1264ea67f93eabe53c7b555933072231e108d.tar.gz
hdf5-bbc1264ea67f93eabe53c7b555933072231e108d.tar.bz2
Follow longstanding execv convention for compatibility with NetBSD.
Diffstat (limited to 'test/accum.c')
-rw-r--r--test/accum.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/accum.c b/test/accum.c
index 91acf0f..f7d02fd 100644
--- a/test/accum.c
+++ b/test/accum.c
@@ -1838,7 +1838,6 @@ test_swmr_write_big(hbool_t newest_format)
pid_t pid; /* Process ID */
#endif /* H5_HAVE_UNISTD_H */
int status; /* Status returned from child process */
- char *new_argv[] = {NULL};
char *driver = NULL; /* VFD string (from env variable) */
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
@@ -1968,6 +1967,13 @@ test_swmr_write_big(hbool_t newest_format)
FAIL_STACK_ERROR;
}
else if(0 == pid) { /* Child process */
+ /* By convention, argv[0] tells the name of program invoked.
+ *
+ * execv on NetBSD 8 will actually return EFAULT if there is a
+ * NULL at argv[0], so we follow the convention unconditionally.
+ */
+ char swmr_reader[] = SWMR_READER;
+ char * const new_argv[] = {swmr_reader, NULL};
/* Run the reader */
status = HDexecv(SWMR_READER, new_argv);
HDprintf("errno from execv = %s\n", strerror(errno));