Greenbone Vulnerability Management Libraries  21.4.2
Macros | Functions | Variables
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>

Macros

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

Functions

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

Variables

const char * __progname
 Access to the executable's name. More...
 
const char * __progname_full
 
static int argv_len
 
static char ** old_argv
 
char ** environ
 
void * current_environ = NULL
 

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]argcArgc argument from main.
[in]argvArgv argument from main.

◆ proctitle_set()

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

Sets the process' title.

Parameters
[in]new_titleFormat 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_titleFormat string for new process title.
[in]argsFormat string arguments variable list.

Variable Documentation

◆ __progname

const char* __progname
extern

Access to the executable's name.

◆ __progname_full

const char* __progname_full
extern

◆ argv_len

int argv_len
static

◆ current_environ

void* current_environ = NULL

◆ environ

char** environ
extern

◆ old_argv

char** old_argv
static