EPICS Home

Experimental Physics and Industrial Control System


 
2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: [Merge] ~dirk.zimoch/epics-base:iocLogClientFixes into epics-base:7.0
From: mdavidsaver via Core-talk <[email protected]>
To: [email protected]
Date: Wed, 04 Sep 2019 02:48:51 -0000
Review: Needs Information

What necessitates removing shutdown() and adding select()/recv()?  To my knowledge send() should return with an error if the socket is, or becomes, disconnected.

Diff comments:

> diff --git a/modules/libcom/src/log/logClient.c b/modules/libcom/src/log/logClient.c
> index 99ee671..0056a21 100644
> --- a/modules/libcom/src/log/logClient.c
> +++ b/modules/libcom/src/log/logClient.c
> @@ -507,14 +465,22 @@ logClientId epicsShareAPI logClientCreate (
>      pClient->shutdownConfirm = 0;
>  
>      epicsAtExit (logClientDestroy, (void*) pClient);

I notice that the atexit is too early.  This should be moved to the end, after success is certain.

> -    
> +
>      pClient->stateChangeNotify = epicsEventCreate (epicsEventEmpty);
>      if ( ! pClient->stateChangeNotify ) {
>          epicsMutexDestroy ( pClient->mutex );
>          free ( pClient );
>          return NULL;
>      }
> -   
> +
> +    pClient->shutdownNotify = epicsEventCreate (epicsEventEmpty);
> +    if ( ! pClient->shutdownNotify ) {
> +        epicsMutexDestroy ( pClient->mutex );
> +        epicsEventDestroy ( pClient->stateChangeNotify );
> +        free ( pClient );
> +        return NULL;
> +    }
> +
>      pClient->restartThreadId = epicsThreadCreate (
>          "logRestart", epicsThreadPriorityLow, 
>          epicsThreadGetStackSize(epicsThreadStackSmall),


-- 
https://code.launchpad.net/~dirk.zimoch/epics-base/+git/epics-base/+merge/372043
Your team EPICS Core Developers is subscribed to branch epics-base:7.0.

References:
[Merge] ~dirk.zimoch/epics-base:iocLogClientFixes into epics-base:7.0 Dirk Zimoch via Core-talk

Navigate by Date:
Prev: Re: pvPutLog? Michael Davidsaver via Core-talk
Next: Re: [Merge] ~anj/epics-base/+git/base-3.15:decimate-filter into epics-base:3.15 mdavidsaver via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: [Merge] ~dirk.zimoch/epics-base:iocLogClientFixes into epics-base:7.0 Dirk Zimoch via Core-talk
Next: Re: [Merge] ~dirk.zimoch/epics-base:iocLogClientFixes into epics-base:7.0 Dirk Zimoch via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024