Example #1
0
GLDEF_C TInt E32Main()
	{     
	CTrapCleanup::New();

	RWin32Stream::StartServer();	// arrange for access to Win32 stdin/stdout/stderr
	SpawnPosixServerThread();	// arrange for multi-threaded operation

	int argc=0;
	wchar_t** wargv=0;
	wchar_t** wenvp=0;


	__crt0(argc,wargv,wenvp);			// get args & environment from somewhere

#ifndef EKA2
	// Cause the graphical Window Server to come into existence
	RSemaphore sem;
	sem.CreateGlobal(_L("WsExeSem"),0);
	RegisterWsExe(sem.FullName());
#endif

	int ret=wmain(argc, wargv, wenvp);		// go

	// no need to explicitly delete the cleanup stack here as all memory used by
	// the process will be released by RProcess::Terminate(), called from inside exit().

	exit(ret);	// to get atexit processing, eventually terminates this process

	return(KErrNone);
	}
Example #2
0
TInt processhelper (TAny* aFn)
	{
	// Do the MCRT0.OBJ things straight away
	NewProcessId();
	SpawnPosixServerThread();
	char wd[80];
	getcwd(wd, sizeof(wd));		// connect to CPosixServer
	return threadhelper(aFn);
	}
Example #3
0
void epoc_spawn_posix_server() {
  SpawnPosixServerThread(); 
}
Example #4
0
EXPORT_C int start_posix_server()
	{
	start_redirection_server();
	return SpawnPosixServerThread();
	}