Have you tried creating the file in the directory returned by confstr(_CS_DARWIN_USER_TEMP_DIR...? See man 3 confstr for details. This directory can be shown from command line with getconf DARWIN_USER_TEMP_DIR
Topic:
App & System Services
SubTopic:
General
Tags: