yast2-core
|
#include <stdarg.h>
#include <unistd.h>
#include <signal.h>
#include <execinfo.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sstream>
#include <iomanip>
#include <string>
#include <ycp/y2log.h>
#include <ycp/ExecutionEnvironment.h>
#include "Y2Component.h"
#include "Y2ErrorComponent.h"
#include "Y2ComponentBroker.h"
#include <YCP.h>
#include <ycp/Parser.h>
#include <ycp/pathsearch.h>
#include "exitcodes.h"
#include <debugger/Debugger.h>
Macros | |
#define | _GNU_SOURCE |
#define | MAX_YCP_ERROR_EXIT_SYMBOLS 2 |
number of symbols that are handled as error codes More... | |
Functions | |
static void | print_usage () |
static void | print_help () |
static void | print_error (const char *,...) __attribute__((format(printf |
static void static bool | has_parens (const char *arg) |
static void | signal_log_to_fd (int fd, const char *cs) |
static void | signal_log (const char *cs) |
static bool | signal_log_ss (const string &s) |
static void | signal_log_timestamp () |
static void | signal_log_stored_debug () |
void | signal_log_backtrace () |
void | signal_log_open () |
void | signal_handler (int sig) |
void | parse_client_and_options (int argc, char **argv, int &arg, char *&client_name, YCPList &arglist) |
void | parse_server_and_options (int argc, char **argv, int &arg, char *&server_name, YCPList &preload) |
int | main (int argc, char **argv) |
Variables | |
const char * | ycp_error_exit_symbols [MAX_YCP_ERROR_EXIT_SYMBOLS] |
symbol names that are handled as error codes when returned by the client More... | |
Debugger * | debugger_instance |
static const char * | progname = "genericfrontend" |
fallback name of the program More... | |
int | signal_log_fd |
bool | debugger = false |
bool | debugger_remote = false |
Generic main function handler for all YaST2 applications.
#define _GNU_SOURCE |
#define MAX_YCP_ERROR_EXIT_SYMBOLS 2 |
number of symbols that are handled as error codes
Referenced by main().
|
static |
Referenced by parse_client_and_options(), and parse_server_and_options().
int main | ( | int | argc, |
char ** | argv | ||
) |
References YCPList::add(), YCPPathSearch::addPath(), YCPPathSearch::Client, YCPList::contains(), Y2ComponentBroker::createClient(), Y2ComponentBroker::createServer(), debugger, debugger_remote, Y2Component::doActualWork(), Y2Component::evaluate(), Y2ComponentBroker::getNamespaceComponent(), YCPPathSearch::Include, Debugger::initialize(), YCPPathSearch::initialize(), YCPElement::isNull(), MAX_YCP_ERROR_EXIT_SYMBOLS, YCPPathSearch::Module, parse_client_and_options(), parse_server_and_options(), print_error(), print_help(), print_usage(), progname, Y2ComponentBroker::registerNamespaceException(), Y2Component::result(), YCPPathSearch::searchListBegin(), YCPPathSearch::searchListEnd(), set_log_conf(), set_log_filename(), Y2Component::setServerOptions(), signal_handler(), YCPList::size(), YCPList::value(), y2debug, y2milestone, YAST_CLIENTRESULT, YAST_FEWARGUMENTS, YAST_OK, YAST_OPTIONERROR, and ycp_error_exit_symbols.
void parse_client_and_options | ( | int | argc, |
char ** | argv, | ||
int & | arg, | ||
char *& | client_name, | ||
YCPList & | arglist | ||
) |
References YCPList::add(), has_parens(), YCPElement::isNull(), Parser::parse(), parser, print_error(), print_usage(), YAST_FEWARGUMENTS, and YAST_OPTIONERROR.
Referenced by main().
void parse_server_and_options | ( | int | argc, |
char ** | argv, | ||
int & | arg, | ||
char *& | server_name, | ||
YCPList & | preload | ||
) |
References YCPList::add(), has_parens(), Parser::parse(), parser, print_error(), print_usage(), YAST_FEWARGUMENTS, and YAST_OPTIONERROR.
Referenced by main().
|
static |
References y2error.
Referenced by main(), parse_client_and_options(), and parse_server_and_options().
|
static |
References progname.
|
static |
Referenced by main(), parse_client_and_options(), and parse_server_and_options().
void signal_handler | ( | int | sig | ) |
References YaST::ee, signal_log(), signal_log_backtrace(), signal_log_fd, signal_log_open(), signal_log_stored_debug(), signal_log_timestamp(), and signal_log_to_fd().
Referenced by main(), and set_signal_handler().
|
static |
References signal_log_fd, and signal_log_to_fd().
Referenced by signal_handler(), signal_log_backtrace(), signal_log_ss(), signal_log_stored_debug(), and signal_log_timestamp().
void signal_log_backtrace | ( | ) |
References signal_log(), and signal_log_fd.
Referenced by signal_handler().
void signal_log_open | ( | ) |
References signal_log_fd.
Referenced by signal_handler().
|
static |
References signal_log().
Referenced by signal_log_stored_debug().
|
static |
References blanik, LogTail::for_each(), signal_log(), and signal_log_ss().
Referenced by signal_handler().
|
static |
References signal_log().
Referenced by signal_handler().
|
static |
Referenced by signal_handler(), and signal_log().
bool debugger = false |
Referenced by Y2WFMComponent::doActualWork(), and main().
Debugger* debugger_instance |
bool debugger_remote = false |
Referenced by main().
|
static |
fallback name of the program
Referenced by main(), and print_help().
int signal_log_fd |
Referenced by signal_handler(), signal_log(), signal_log_backtrace(), and signal_log_open().
const char* ycp_error_exit_symbols[MAX_YCP_ERROR_EXIT_SYMBOLS] |
symbol names that are handled as error codes when returned by the client
Referenced by main().