本文整理汇总了C++中CondorError::subsys方法的典型用法代码示例。如果您正苦于以下问题:C++ CondorError::subsys方法的具体用法?C++ CondorError::subsys怎么用?C++ CondorError::subsys使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CondorError
的用法示例。
在下文中一共展示了CondorError::subsys方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: list
//.........这里部分代码省略.........
if( request_num == CONDOR_CommitTransaction ) {
assert( syscall_sock->code(flags) );
}
else {
flags = 0;
}
assert( syscall_sock->end_of_message() );;
errno = 0;
CondorError errstack;
rval = CheckTransaction( flags, & errstack );
terrno = errno;
dprintf( D_SYSCALLS, "\tflags = %d, rval = %d, errno = %d\n", flags, rval, terrno );
if( rval >= 0 ) {
errno = 0;
CommitTransaction( flags );
// CommitTransaction() never returns on failure
rval = 0;
terrno = errno;
dprintf( D_SYSCALLS, "\tflags = %d, rval = %d, errno = %d\n", flags, rval, terrno );
}
syscall_sock->encode();
assert( syscall_sock->code(rval) );
if( rval < 0 ) {
assert( syscall_sock->code(terrno) );
const CondorVersionInfo *vers = syscall_sock->get_peer_version();
if (vers && vers->built_since_version(8, 3, 4))
{
// Send a classad, for less backwards-incompatibility.
int code = 1;
const char * reason = "QMGMT rejected job submission.";
if( errstack.subsys() ) {
code = 2;
reason = errstack.message();
}
ClassAd reply;
reply.Assign( "ErrorCode", code );
reply.Assign( "ErrorReason", reason );
assert( putClassAd( syscall_sock, reply ) );
}
}
assert( syscall_sock->end_of_message() );;
return 0;
}
case CONDOR_GetAttributeFloat:
{
int cluster_id = -1;
int proc_id = -1;
char *attr_name=NULL;
float value = 0.0;
int terrno;
assert( syscall_sock->code(cluster_id) );
dprintf( D_SYSCALLS, " cluster_id = %d\n", cluster_id );
assert( syscall_sock->code(proc_id) );
dprintf( D_SYSCALLS, " proc_id = %d\n", proc_id );
assert( syscall_sock->code(attr_name) );
assert( syscall_sock->end_of_message() );;
errno = 0;
if( QmgmtMayAccessAttribute( attr_name ) ) {
rval = GetAttributeFloat( cluster_id, proc_id, attr_name, &value );