KInit
kinit.cpp File Reference
#include <config.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/wait.h>
#include <errno.h>
#include <fcntl.h>
#include "proctitle.h"
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <locale.h>
#include <QtCore/QLibrary>
#include <QtCore/QString>
#include <QtCore/QFile>
#include <QtCore/QDate>
#include <QtCore/QFileInfo>
#include <QtCore/QRegExp>
#include <QtGui/QFont>
#include <kcomponentdata.h>
#include <kdemacros.h>
#include <kstandarddirs.h>
#include <kglobalsettings.h>
#include <kglobal.h>
#include <kconfig.h>
#include <klibloader.h>
#include <kapplication.h>
#include <klocale.h>
#include <kdebug.h>
#include <kde_file.h>
#include <kdeversion.h>
#include "klauncher_cmds.h"
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <fixx11h.h>
#include <kstartupinfo.h>
#include <kparts/plugin.h>
#include <kio/authinfo.h>
Go to the source code of this file.
Defines | |
#define | DISPLAY "DISPLAY" |
#define | MAX_SOCK_FILE 255 |
#define | QT_NO_CAST_FROM_ASCII |
Functions | |
KParts::Plugin * | _kinit_init_kparts () |
KIO::AuthInfo * | _kioslave_init_kio () |
static void | child_died (pid_t exit_pid, int exit_status) |
static void | cleanup_fds () |
static void | close_fds () |
static void | complete_startup_info (KStartupInfoId &id, pid_t pid) |
QByteArray | execpath_avoid_loops (const QByteArray &exec, int envc, const char *envs, bool avoid_loops) |
static void | exitWithErrorMsg (const QString &errorMsg) |
static int | get_current_desktop (Display *disp) |
const char * | get_env_var (const char *var, int envc, const char *envs) |
static bool | handle_launcher_request (int sock, const char *who) |
static void | handle_requests (pid_t waitForPid) |
static void | init_kdeinit_socket () |
static void | init_signals () |
static void | init_startup_info (KStartupInfoId &id, const char *bin, int envc, const char *envs) |
static int | initXconnection () |
static void | kdeinit_library_path () |
int | kdeinit_x_errhandler (Display *, XErrorEvent *err) |
int | kdeinit_xio_errhandler (Display *) |
static pid_t | launch (int argc, const char *_name, const char *args, const char *cwd=0, int envc=0, const char *envs=0, bool reset_env=false, const char *tty=0, bool avoid_loops=false, const char *startup_id_str="0") |
static void | launcher_died () |
int | main (int argc, char **argv, char **envp) |
static int | read_socket (int sock, char *buffer, int len) |
static void | secondary_child_handler (int) |
static void | setup_tty (const char *tty) |
static void | setupX () |
static void | sig_child_handler (int) |
static void | start_klauncher () |
Variables | |
static struct child * | children |
struct { | |
int accepted_fd | |
char ** argv | |
int deadpipe [2] | |
bool debug_wait | |
QByteArray errorMsg | |
int exit_status | |
int fd [2] | |
pid_t fork | |
int(* func )(int, char *[]) | |
int initpipe [2] | |
pid_t kded_pid | |
int launcher [2] | |
int(* launcher_func )(int) | |
bool launcher_ok | |
pid_t launcher_pid | |
int maxname | |
int n | |
char result | |
bool suicide | |
int wrapper | |
} | d |
char ** | environ |
static KComponentData * | s_instance = 0 |
static char | sock_file [MAX_SOCK_FILE] |
static Display * | X11_startup_notify_display = 0 |
static int | X11_startup_notify_fd = -1 |
static Display * | X11display = 0 |
static int | X11fd = -1 |
Define Documentation
Function Documentation
static void child_died | ( | pid_t | exit_pid, | |
int | exit_status | |||
) | [static] |
static void complete_startup_info | ( | KStartupInfoId & | id, | |
pid_t | pid | |||
) | [static] |
QByteArray execpath_avoid_loops | ( | const QByteArray & | exec, | |
int | envc, | |||
const char * | envs, | |||
bool | avoid_loops | |||
) |
static void exitWithErrorMsg | ( | const QString & | errorMsg | ) | [static] |
static int get_current_desktop | ( | Display * | disp | ) | [static] |
const char* get_env_var | ( | const char * | var, | |
int | envc, | |||
const char * | envs | |||
) |
static bool handle_launcher_request | ( | int | sock, | |
const char * | who | |||
) | [static] |
static void handle_requests | ( | pid_t | waitForPid | ) | [static] |
static void init_kdeinit_socket | ( | ) | [static] |
static void init_startup_info | ( | KStartupInfoId & | id, | |
const char * | bin, | |||
int | envc, | |||
const char * | envs | |||
) | [static] |
int kdeinit_x_errhandler | ( | Display * | dpy, | |
XErrorEvent * | err | |||
) |
int kdeinit_xio_errhandler | ( | Display * | disp | ) |
int main | ( | int | argc, | |
char ** | argv, | |||
char ** | envp | |||
) |
static int read_socket | ( | int | sock, | |
char * | buffer, | |||
int | len | |||
) | [static] |
Variable Documentation
int accepted_fd |
struct { ... } d [static] |
char** environ |
int exit_status |
int(* func)(int, char *[]) |
int(* launcher_func)(int) |
pid_t launcher_pid |
KComponentData* s_instance = 0 [static] |
Display* X11_startup_notify_display = 0 [static] |
int X11_startup_notify_fd = -1 [static] |
Display* X11display = 0 [static] |