libc tmpnam default directory doesn't exist

14 views
Skip to first unread message

Douglas Rupp

unread,
Apr 4, 2014, 12:13:02 PM4/4/14
to andro...@googlegroups.com

The tmpnam() function in libc.a creates a file something like:
/tmp/tmp.0.NGtVN2537

The problem is that there is no /tmp by default directory on Android.  This seems like an obvious bug, but in the mean time for my I can write a wrapper and use mkstemp() instead, using a template
like "/<some_dir>/FOO-XXXXXX"

My question is what to use for /<some_dir>   Looking through the hierarchy, it looks like "/cache" might be the right place to put temp files.  Does this seem right, or is there a better place?

--Doug
Reply all
Reply to author
Forward
0 new messages