library/src/blockclass/BP-BlockClass.cc
// Starts a new process with argv/envp pointers
Starts a new process with argv/envp pointers
Starts a new process with argv / envp pointers
int Block::DbgStartCreateProc(char * path, char **args, char **environment)
{
	if (dbgHandle != NULL)
	{
		if (dbgHandle->attached > 0)
		{
			DebugDetach(dbgHandle);
		}
	}
	if (dbgHandle != NULL)
	{
		DestroyDebugHandle(dbgHandle);
		dbgHandle = NULL;
	}
	dbgHandle = DebugCreateProcessAttach(path, args, environment);
	if (dbgHandle == NULL)
		return ERR_FAILURE;
	if (dbgHandle->debugPid == -1)
		return ERR_FAILURE;
	return ERR_SUCCESS;
}
int Block :: DbgStartCreateProc ( char * path , char * * args , char * * environment ) { if ( dbgHandle != NULL ) { if ( dbgHandle -> attached > 0 ) { DebugDetach ( dbgHandle ) ; } } if ( dbgHandle != NULL ) { DestroyDebugHandle ( dbgHandle ) ; dbgHandle = NULL ; } dbgHandle = DebugCreateProcessAttach ( path , args , environment ) ; if ( dbgHandle == NULL ) return ERR_FAILURE ; if ( dbgHandle -> debugPid == -1 ) return ERR_FAILURE ; return ERR_SUCCESS ; }
Starts a new process with argv/envp pointers
Starts a new process with argv / envp pointers
// detach if not detached // destroy if not destroyed // now create process // return indicating success