GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-e5379bbd7
clean_temp.c File Reference
#include <grass/config.h>
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
#include <time.h>
#include <sys/types.h>
#include <dirent.h>
#include <sys/stat.h>
#include <grass/gis.h>
#include "local_proto.h"
#include <limits.h>
#include <string.h>
#include <errno.h>
Include dependency graph for clean_temp.c:

Go to the source code of this file.

Macros

#define BUF_MAX   4096
 
#define SLEEP   30 /* 30 seconds */
 

Functions

void clean_dir (const char *pathname, uid_t uid, pid_t pid, time_t now, int max_age)
 
int main (int argc, char *argv[])
 
int find_process (int pid)
 

Macro Definition Documentation

◆ BUF_MAX

#define BUF_MAX   4096

Definition at line 32 of file clean_temp.c.

Referenced by clean_dir(), and main().

◆ SLEEP

#define SLEEP   30 /* 30 seconds */

Definition at line 35 of file clean_temp.c.

Referenced by main().

Function Documentation

◆ clean_dir()

void clean_dir ( const char *  pathname,
uid_t  uid,
pid_t  pid,
time_t  now,
int  max_age 
)

Definition at line 39 of file clean_temp.c.

References BUF_MAX, find_process(), G_fatal_error(), G_snprintf(), G_strcasecmp(), G_warning(), NULL, opendir(), and readdir().

Referenced by main().

◆ find_process()

int find_process ( int  pid)

Definition at line 171 of file clean_temp.c.

Referenced by clean_dir(), and main().

◆ main()

int main ( int  argc,
char *  argv[] 
)