gnunet-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GNUnet-developers] using $TMPDIR instead of /tmp


From: Christian Grothoff
Subject: Re: [GNUnet-developers] using $TMPDIR instead of /tmp
Date: Sat, 5 May 2018 15:06:05 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 05/05/2018 03:01 PM, Nils Gillmann wrote:
>> Agreed, it would be great if you could change the tests to use the
> 
> Okay, any idea how the .conf files should be adjusted, given that
> you most likely came up with the config system?

Actually, we just use some shell-ism for that.

Regardless, I just added GNUNET_TMP to util.conf, so you should be able
to replace any occurrence of "/tmp/foo" in configuration files with
"$GNUNET_TMP/foo", which will result in $TMPDIR/gnunet/foo (or $TMP, or
/tmp, if $TMPDIR is undefined) being used.

> I think they don't require absolute filenames, but if we have multiple flavors
> of how and where the temporary directory can be located, what do we use in
> place of /tmp/gnunet-something/file then?

If you need something per-instance (if multiple peers are running), such
as UNIX domain sockets, use $GNUNET_USER_RUNTIME_DIR or for system
services $GNUNET_RUNTIME_DIR.  For classical temporary files (say of the
driver of a testcase, we now have $GNUNET_TMP.  For per-peer caches use
$GNUNET_CACHE_HOME.  All are defined in src/util/util.conf

> I assume a config-file function that does the same as the function in 
> libgnunetutil
> disk.c could be useful.

The above effectively do the same, right now without the check for
$TEMP, but that could be added if desired.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]