Any comments on the fix attached to XX-6890?

Dale


On Tue, 2009-10-27 at 13:28 -0500, Dale Worley (JIRA) wrote:
> OsProcessLinux::getOutput returns -1 when process is stopped and restarted by 
> GDB
> ---------------------------------------------------------------------------------
> 
>                  Key: XX-6890
>                  URL: http://track.sipfoundry.org/browse/XX-6890
>              Project: sipXecs
>           Issue Type: Bug
>     Affects Versions: 4.1
>          Environment: rev. 16955
>             Reporter: Dale Worley
>          Attachments: getOutput.diff
> 
> When a process is stopped and restarted (e.g., by being attached and
> detached by GDB), OsProcessLinux::getOutput returns -1 because the
> call to poll() within it returns EINTR.  The caller of getOutput
> interprets this -1 as meaning that the read(s) from the pipe(s)
> returned an error, meaning that the child process has terminated.
> 
> This can be fixed by the standard technique of testing if the poll()
> has returned -1 with errno = EINTER and if so, re-executing the
> poll().
> 
> The attached getOutput.diff does this.  It also expands the comment
> about getOutput in OsProcess.h, and changes how the testing of the
> output of poll() is done in order to make the logic clearer.


_______________________________________________
sipx-dev mailing list [email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
sipXecs IP PBX -- http://www.sipfoundry.org/

Reply via email to