mirror of https://github.com/BOINC/boinc.git
copy client's executable into working dir
git-svn-id: svn+ssh://cvs.lpds.sztaki.hu/var/lib/svn/szdg/dcapi/trunk@597 a7169a2c-3604-0410-bc95-c702d8d87f7a
This commit is contained in:
parent
bff1ee8bb4
commit
6f778890dc
|
@ -45,6 +45,8 @@ int wu_check_logical_name(DC_Workunit *wu, const char *logicalFileName)
|
|||
return(DC_ERR_BADPARAM);
|
||||
}
|
||||
}
|
||||
DC_log(LOG_DEBUG, "Logical filename %s checked OK",
|
||||
logicalFileName);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
@ -61,9 +63,10 @@ int wu_gen_condor_submit(DC_Workunit *wu)
|
|||
{
|
||||
FILE *f= NULL;
|
||||
GString *fn;
|
||||
char *cfgval;
|
||||
|
||||
if (!wu)
|
||||
return(-2);
|
||||
return(DC_ERR_BADPARAM);
|
||||
|
||||
fn= g_string_new(wu->workdir);
|
||||
fn= g_string_append(fn, "/condor_submit.txt");
|
||||
|
@ -71,9 +74,12 @@ int wu_gen_condor_submit(DC_Workunit *wu)
|
|||
{
|
||||
DC_log(LOG_ERR, "Condor submit file %s creation failed",
|
||||
fn->str);
|
||||
return(-1);
|
||||
g_string_free(fn, TRUE);
|
||||
return(DC_ERR_SYSTEM);
|
||||
}
|
||||
|
||||
g_string_free(fn, TRUE);
|
||||
|
||||
cfgval= DC_getCfgStr(CFG_ARCHITECTURES);
|
||||
fprintf(f, "Executable = %s\n", wu->client_name);
|
||||
fprintf(f, "Universe = vanilla\n");
|
||||
fprintf(f, "output = internal_output.txt\n");
|
||||
|
@ -84,7 +90,34 @@ int wu_gen_condor_submit(DC_Workunit *wu)
|
|||
|
||||
if (f)
|
||||
fclose(f);
|
||||
return(0);
|
||||
return(DC_OK);
|
||||
}
|
||||
|
||||
|
||||
int wu_make_client_executables(DC_Workunit *wu)
|
||||
{
|
||||
char *archs;
|
||||
int ret;
|
||||
GString *src, *dst;
|
||||
|
||||
if (!wu)
|
||||
return(DC_ERR_BADPARAM);
|
||||
|
||||
archs= DC_getCfgStr(CFG_ARCHITECTURES);
|
||||
|
||||
src= g_string_new(wu->client_name);
|
||||
dst= g_string_new(wu->workdir);
|
||||
g_string_append(dst, "/");
|
||||
g_string_append(dst, wu->client_name);
|
||||
DC_log(LOG_DEBUG, "Copying client executable %s to %s",
|
||||
src->str, dst->str);
|
||||
ret= _DC_copyFile(src->str, dst->str);
|
||||
g_string_free(src, TRUE);
|
||||
g_string_free(dst, TRUE);
|
||||
if (!ret)
|
||||
return(ret);
|
||||
|
||||
return(DC_OK);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue