#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <ctype.h>
#include <signal.h>
#include <errno.h>
#include <time.h>
#include <syslog.h>
#include <grp.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <dirent.h>
#include <sys/param.h>
#include <sys/wait.h>
#include <unistd.h>
#include <pwd.h>
Go to the source code of this file.
◆ _errexit
#define _errexit |
( |
| fn, |
|
|
| reason, |
|
|
| ... ) |
Value: do {
if ((fn) == -1) {
_errno_msg (reason, ## __VA_ARGS__); } }
while (0)
#define _errno_msg(reason,...)
Definition at line 88 of file runvdr.c.
Referenced by scan_plugins().
◆ _errno_log
#define _errno_log |
( |
| reason, |
|
|
| ... ) |
Value: do { \
int err = errno; \
fprintf (stderr,
"%s: " reason
": %s\n",
progname, ## __VA_ARGS__, strerror (err)); \
syslog (LOG_ERR, reason ": %s", ## __VA_ARGS__, strerror (err)); \
_exit (2); \
} while (0)
static const char * progname
Definition at line 77 of file runvdr.c.
Referenced by main().
◆ _errno_msg
#define _errno_msg |
( |
| reason, |
|
|
| ... ) |
Value: do { \
fprintf (stderr,
"%s: " reason
": %s\n",
progname, ## __VA_ARGS__, strerror (errno)); \
_exit (2); \
} while (0)
Definition at line 63 of file runvdr.c.
Referenced by scan_plugins().
◆ _GNU_SOURCE
◆ BASEMOD
◆ errexit
#define errexit |
( |
| fn, |
|
|
| reason, |
|
|
| ... ) |
◆ errmsg
#define errmsg |
( |
| reason, |
|
|
| ... ) |
◆ errno_log
#define errno_log |
( |
| reason, |
|
|
| ... ) |
Value: do { \
int err = errno; \
fprintf (stderr,
"%s: " reason
": %s\n",
progname, ## __VA_ARGS__, strerror (err)); \
syslog (LOG_ERR, reason ": %s", ## __VA_ARGS__, strerror (err)); \
exit (2); \
} while (0)
Definition at line 69 of file runvdr.c.
Referenced by main().
◆ errno_msg
#define errno_msg |
( |
| reason, |
|
|
| ... ) |
◆ NUM_STOPTIMES
◆ PIDFILE
#define PIDFILE "/var/run/vdr.pid" |
◆ VDRBIN
#define VDRBIN "/usr/bin/vdr" |
◆ dowait()
◆ getenv_default()
const char * getenv_default |
( |
const char * | var, |
|
|
const char * | dflt ) |
|
static |
◆ list_append()
void list_append |
( |
List * | list, |
|
|
const char * | item ) |
|
static |
◆ list_find()
size_t list_find |
( |
List * | list, |
|
|
const char * | cmp ) |
|
static |
◆ list_free()
void list_free |
( |
List * | list | ) |
|
|
static |
◆ list_remove()
void list_remove |
( |
List * | list, |
|
|
size_t | index ) |
|
static |
◆ main()
int main |
( |
int | argc, |
|
|
char * | argv[] ) |
Definition at line 550 of file runvdr.c.
References _errno_log, dowait(), errexit, errmsg, errno_log, errno_msg, List::items, list_append(), list_free(), NUM_STOPTIMES, parse_modules_24(), parse_modules_26(), pidfile_remove(), pidfile_write(), progname, scan_plugins(), sig_default(), sig_propagate(), sig_quit(), stoptimecount, stoptimes, usr1, vdr, and VDRBIN.
◆ parse_modules_24()
char * parse_modules_24 |
( |
char * | line, |
|
|
int | budget ) |
|
static |
◆ parse_modules_26()
char * parse_modules_26 |
( |
char * | line, |
|
|
int | budget ) |
|
static |
◆ pidfile_remove()
void pidfile_remove |
( |
void | | ) |
|
|
static |
◆ pidfile_write()
void pidfile_write |
( |
void | | ) |
|
|
static |
◆ scan_plugins()
void scan_plugins |
( |
List * | args | ) |
|
|
static |
Definition at line 281 of file runvdr.c.
References _errexit, _errno_msg, dowait(), errexit, errmsg, errno_msg, getenv_default(), List::items, List::length, list_append(), list_find(), list_free(), list_remove(), and VERSION.
Referenced by main().
◆ sig_default()
void sig_default |
( |
int | sig | ) |
|
|
static |
◆ sig_propagate()
void sig_propagate |
( |
int | sig | ) |
|
|
static |
◆ sig_quit()
◆ mod_budget
const char mod_budget[] = "budget-core\0\0" |
|
static |
◆ mod_dvb
const char mod_dvb[] = "dvb-core\0\0" |
|
static |
◆ progname
◆ stoptimecount
◆ stoptimes
◆ usr1
◆ vdr