f80935e66086e97d29426bb9053c10eae078385b kent Sun Feb 2 16:22:01 2014 -0800 Moving a check on commands against message size to library since in fact it was already implemented twice, and I needed it a third time. diff --git src/parasol/para/para.c src/parasol/para/para.c index 895e281..765f468 100644 --- src/parasol/para/para.c +++ src/parasol/para/para.c @@ -888,35 +888,31 @@ errAbort("write failed: %s", newJobList); carefulClose(&newFh); jobDbFree(&db); freeHash(&hash); } boolean submitJob(struct job *job) /* Attempt to submit job. */ { struct dyString *cmd = dyStringNew(1024); struct submission *sub; char *jobId = NULL; dyStringPrintf(cmd, "addJob2 %s %s /dev/null /dev/null %s %f %lld %s", getUser(), jobCwd, resultsName, job->cpusUsed, job->ramUsed, job->command); -if (cmd->stringSize > rudpMaxSize) - errAbort("The following string has %d bytes, but can only be %d:\n%s\n" - "Please either shorten the current directory or the command line\n" - "possibly by making a shell script that encapsulates a long command.\n" - , cmd->stringSize, (int)rudpMaxSize, cmd->string); +pmCheckCommandSize(cmd->string, cmd->stringSize); jobId = hubSingleLineQuery(cmd->string); if (sameString(jobId,"0")) { warn("addJob failed - if batch is bad, correct problem and run para clearSickNodes."); freez(&jobId); } if (jobId != NULL) { AllocVar(sub); slAddHead(&job->submissionList, sub); job->submissionCount += 1; sub->submitTime = time(NULL); sub->host = cloneString("n/a"); sub->id = jobId; sub->inQueue = TRUE;