libexplain  1.4.D001
Data Structures | Typedefs | Functions
libexplain/fileinfo/pid_cwd.c File Reference
#include <libexplain/ac/stdio.h>
#include <libexplain/ac/string.h>
#include <libexplain/ac/unistd.h>
#include <libexplain/fileinfo.h>
#include <libexplain/lsof.h>

Go to the source code of this file.

Data Structures

struct  adapter

Typedefs

typedef struct adapter adapter

Functions

static void n_callback (explain_lsof_t *context, const char *name)
int explain_fileinfo_pid_cwd (pid_t pid, char *data, size_t data_size)

Typedef Documentation

typedef struct adapter adapter

Definition at line 53 of file pid_cwd.c.


Function Documentation

int explain_fileinfo_pid_cwd ( pid_t  pid,
char *  data,
size_t  data_size 
)

The explain_fileinfo_pid_cwd function may be used to obtain the absolute path of the current working directory of the given process.

Parameters:
pidThe process ID of the process of interest.
dataWhere to return the path.
data_sizeThe maximum size of the returned path.
Returns:
true (non-zero) on success, or false (zero) on error

Definition at line 82 of file pid_cwd.c.

static void n_callback ( explain_lsof_t context,
const char *  name 
) [static]

Definition at line 64 of file pid_cwd.c.