library/src/blockclass/BP-BlockClass.cc
// executes the given file at path provided that the
// user has privileges to execute the file. If the
// returnFds flag is set to true, it will return all
// standard file streams (stdin/out/err) in the classes
// fdSet struct.
executes the given file at path provided that the
user has privileges to execute the file. If the
returnFds flag is set to true, it will return all
standard file streams (stdin/out/err) in the classes
fdSet struct.
executes the given file at path provided that the user has privileges to execute the file . If the returnFds flag is set to true it will return all standard file streams ( stdin / out / err ) in the classes fdSet struct .
int Block::File_Execute(char *filePath, char **params, char **envp, BP_BOOL returnFds)
{
	if(this->fdSet)
	{
		tq_free(this->tq, this->fdSet);
		this->fdSet = NULL;
	}
	this->fdSet = BP_FExec(filePath, params, envp, returnFds);
	tq_link(this->tq, this->fdSet, 4, BPLN);
	if (returnFds == true)
	if (fdSet == NULL)
		return ERR_FAILURE;
	return ERR_SUCCESS;
}
int Block :: File_Execute ( char * filePath , char * * params , char * * envp , BP_BOOL returnFds ) { if ( this -> fdSet ) { tq_free ( this -> tq , this -> fdSet ) ; this -> fdSet = NULL ; } this -> fdSet = BP_FExec ( filePath , params , envp , returnFds ) ; tq_link ( this -> tq , this -> fdSet , 4 , BPLN ) ; if ( returnFds == true ) if ( fdSet == NULL ) return ERR_FAILURE ; return ERR_SUCCESS ; }
executes the given file at path provided that the
user has privileges to execute the file.
executes the given file at path provided that the user has privileges to execute the file .
// destroy the fd set if we already have one // exec the file // link the file descriptor set into our tail queue // check if we have fds // return indicating success