From 6525896154b56e1a62b8faa0e2759af6a34465e8 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Sat, 9 Jul 2011 08:31:53 +0200 Subject: [PATCH] Make processes work on HP-UX Signed-off-by: Jens Axboe --- fio.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fio.c b/fio.c index 81854818..a8608f49 100644 --- a/fio.c +++ b/fio.c @@ -1294,6 +1294,7 @@ static int fork_main(int shmid, int offset) struct thread_data *td; void *data, *ret; +#ifndef __hpux data = shmat(shmid, NULL, 0); if (data == (void *) -1) { int __err = errno; @@ -1301,6 +1302,12 @@ static int fork_main(int shmid, int offset) perror("shmat"); return __err; } +#else + /* + * HP-UX inherits shm mappings? + */ + data = threads; +#endif td = data + offset * sizeof(struct thread_data); ret = thread_main(td); -- 2.25.1