/* This file is part of Lcrzo.
*/

int lcrzo_ipc_currentprocessissidea(lcrzo_ipc *pipc)
{

  if (pipc==NULL) return(LCRZO_ERR_PANULLPTR);

  pipc->side=0;

#if defined LCRZOTEST_HOOK_IPCSIDE
  if (lcrzotest_hook_ipcside==LCRZO_FALSE)
#endif
  {
  #if defined LCRZODEF_SYSTEM_Unix
    int ret;
    ret=close(pipc->writepipe[1]);
    if (ret==-1) return(LCRZO_ERR_FUCLOSE); 
    ret=close(pipc->readpipe[1]);
    if (ret==-1) return(LCRZO_ERR_FUCLOSE); 
  #elif defined LCRZODEF_SYSTEM_Windows
    /* close nothing */
  #else
    #error "Unknown value for LCRZODEF_SYSTEM"
  #endif
  }
 
  return(LCRZO_ERR_OK);
}


