proctitle.c File Reference

Implementation of an API to set process title. More...

`#include "proctitle.h"`
`#include <glib.h>`
`#include <stdio.h>`
`#include <string.h>`
`#include <sys/param.h>`
`#include <sys/prctl.h>`

## Macros

#define | G_LOG_DOMAIN "libgvm base"
| GLib log domain.

## Functions

void | proctitle_init (int argc, char **argv)
| Initializes the process setting variables.
static void | proctitle_set_args (const char *new_title, va_list args)
| Sets the process' title.
void | proctitle_set (const char *new_title,...)
| Sets the process' title.

## Variables

const char * | __progname
| Access to the executable's name.
const char * | __progname_full
static char ** | old_argv
static int | old_argc
char ** | environ
void * | current_environ = NULL
static int | max_prog_name = 0

## Detailed Description

Implementation of an API to set process title.

## Macro Definition Documentation

## G_LOG_DOMAIN

#define G_LOG_DOMAIN "libgvm base"

GLib log domain.

## Function Documentation

## proctitle_init()

void proctitle_init | ( | int | argc,
|  | char ** | argv
| ) |  |

Initializes the process setting variables.

Parameters

  [in] | argc | Argc argument from main.
  [in] | argv | Argv argument from main.

## proctitle_set()

void proctitle_set | ( | const char * | new_title,
|  |  | ...
| ) |  |

Sets the process' title.

Parameters

  [in] | new_title | Format string for new process title.
  [in] | ... | Arguments for format string.

## proctitle_set_args()

static void proctitle_set_args | ( | const char * | new_title,
|  | va_list | args
| ) |  |

static

Sets the process' title.

Parameters

  [in] | new_title | Format string for new process title.
  [in] | args | Format string arguments variable list.

## Variable Documentation

## __progname

const char* __progname

extern

Access to the executable's name.

## __progname_full

const char* __progname_full

extern

## current_environ

void* current_environ = NULL

## environ

char** environ

extern

## max_prog_name

int max_prog_name = 0

static

## old_argc

int old_argc

static

## old_argv

char** old_argv

static