Memcached-libmemcached
view release on metacpan or search on metacpan
src/libmemcached/clients/ms_setting.c view on Meta::CPAN
/**
* if no configuration file, use this function to create the default
* configuration file.
*/
static void ms_no_config_file()
{
char userpath[PATH_MAX];
struct passwd *usr= NULL;
FILE *fd;
usr= getpwuid(getuid());
snprintf(userpath, PATH_MAX, "%s/%s", usr->pw_dir, DEFAULT_CONFIG_NAME);
if (access (userpath, F_OK | R_OK) == 0)
goto exit;
fd= fopen(userpath, "w+");
if (fd == NULL)
{
( run in 0.261 second using v1.01-cache-2.11-cpan-8d75d55dd25 )