version 1.10, 2003/03/27 17:25:44
|
version 1.11, 2003/04/02 00:44:19
|
|
|
// | // |
// Modified By: Dave Rosckes (rosckes@us.ibm.com) | // Modified By: Dave Rosckes (rosckes@us.ibm.com) |
// | // |
|
// Modified By: Bert Rivero (hurivero@us.ibm.com) |
|
// |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
#include <sys/types.h> | #include <sys/types.h> |
|
|
#include <Pegasus/Common/Logger.h> | #include <Pegasus/Common/Logger.h> |
#include <except.h> | #include <except.h> |
| |
|
#include <stdio.h> |
|
#include "qycmutiltyUtility.H" |
#include "qycmjobjobJob.H" | #include "qycmjobjobJob.H" |
#include "qycmmsgclsMessage.H" | #include "qycmmsgclsMessage.H" |
#include "licall.h" // EPTCALL macros. | #include "licall.h" // EPTCALL macros. |
|
|
return false; | return false; |
} | } |
| |
|
//////////////////////////////////////////////////// |
|
// Setup a fifo for process communication |
|
//////////////////////////////////////////////////// |
|
int init_fifo(const char * fifo_name){ |
|
int fifo = -1; |
|
struct stat FIFO_STAT; |
|
int stat_rc = stat( fifo_name, &FIFO_STAT ); |
|
|
|
// check if the FIFO already exists |
|
if( S_ISFIFO( FIFO_STAT.st_mode ) ){ |
|
// prep FIFO, on this end we only want to write to it, |
|
// set its I/O mode to not block on any reads |
|
fifo = open(fifo_name, O_RDWR | O_NONBLOCK); |
|
} |
|
return fifo; |
|
} |
|
|
|
|
|
//////////////////////////////////////////////////// |
|
// Sends return code back to caller before exiting... |
|
//////////////////////////////////////////////////// |
|
void cimserver_exitRC(int rc){ |
|
int fifo = init_fifo(QYCMSSERV_FIFO); |
|
|
|
if( fifo != -1 ){ |
|
char rc_tmp[3]; |
|
memset(rc_tmp, 0, 3); |
|
sprintf(rc_tmp,"%d",rc); |
|
write(fifo,rc_tmp,strlen(rc_tmp)); |
|
} |
|
} |