LunaSysMgr
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Main.cpp File Reference
#include "Common.h"
#include "HostBase.h"
#include "ApplicationDescription.h"
#include "ApplicationManager.h"
#include "BootupAnimation.h"
#include "CpuAffinity.h"
#include "HapticsController.h"
#include "IpcServer.h"
#include "Localization.h"
#include "WindowServer.h"
#include "WebAppMgrProxy.h"
#include "MemoryMonitor.h"
#include "Settings.h"
#include "SystemService.h"
#include "ApplicationInstaller.h"
#include "Preferences.h"
#include "DeviceInfo.h"
#include "Security.h"
#include "EASPolicyManager.h"
#include "Logging.h"
#include "BackupManager.h"
#include <ProcessKiller.h>
#include "MouseEventEater.h"
#include <sys/time.h>
#include <sys/resource.h>
#include <glib.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/prctl.h>
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
#include <time.h>
#include <pthread.h>
#include <signal.h>
#include <stdarg.h>
#include <syslog.h>
#include <ucontext.h>
#include <sys/file.h>
#include <QApplication>
#include <QtGui>
#include <QtGlobal>
Include dependency graph for Main.cpp:

Functions

void malloc_stats (void)
 
void qtMsgHandler (QtMsgType type, const QMessageLogContext &, const QString &str)
 
pid_t spawnBootupAnimationProcess ()
 
gboolean finishBootup (gpointer data)
 
int main (int argc, char **argv)
 

Variables

volatile bool stayInLoop = true
 
int crashLogFD = -1
 
pid_t sysmgrPid
 
pid_t bootAnimPid
 
int bootAnimPipeFd =-1
 
int sysmgrPipeFd =-1
 
int WebAppMgrPipeFd =-1
 
int IpcServerPipeFd =-1
 
char msgOkToContinue = 0xAB
 
int appArgc = 0
 
char ** appArgv = 0
 

Detailed Description

Main entry point for Luna

Author
Hewlett-Packard Development Company, L.P.

Function Documentation

gboolean finishBootup ( gpointer  data)
int main ( int  argc,
char **  argv 
)

Main program entry point

This function is the one called by the operating system to start Luna.

This function sets appArgc and appArgv.

See Also
appArgc
appArgv
Parameters
argcNumber of command-line arguments
argvPointer to list of char* of each of the arguments
Returns
0 = success, anything else = failure
void malloc_stats ( void  )
void qtMsgHandler ( QtMsgType  type,
const QMessageLogContext &  ,
const QString &  str 
)
pid_t spawnBootupAnimationProcess ( )

Forks the process, runs the bootup animation in the forked process, and sets up pipes for IPC

Returns
The PID of the forked process

Variable Documentation

int appArgc = 0

Number of arguments Luna was started with

This variable is set in main().

See Also
main()
char** appArgv = 0

Pointer to char* of arguments Luna was started with

This variable is set in main().

See Also
main()
pid_t bootAnimPid

Process ID of the bootup animation process

Set by spawnBootupAnimationProcess().

int bootAnimPipeFd =-1

File descriptor of pipe to write to to talk to the boot animation process fork

int crashLogFD = -1

Crash log file descriptor

int IpcServerPipeFd =-1

File descriptor for WebAppManager process fork to read messages from the parent process from

char msgOkToContinue = 0xAB

Message to be passed from parent process to WebAppManager process when the IpcServer is ready

volatile bool stayInLoop = true

Used to allow us to bail from the handler when we're done debugging.

This is meant to be set only from within a gdb seesion.

pid_t sysmgrPid

Process ID of the current process

int sysmgrPipeFd =-1

File descriptor for boot animation process fork to read messages from the parent process from

int WebAppMgrPipeFd =-1

File descriptor of pipe to write to to talk to the WebAppManager process fork