enhanced how to handle an error after mio_dev_make() failure by implementing fail_after_make callbacks in pipe, thr, pro
decided to not call pthread_cancel in thr.c because it's too difficult to get it right
This commit is contained in:
@ -381,8 +381,14 @@ static int dev_sck_make (mio_dev_t* dev, void* ctx)
|
||||
return 0;
|
||||
|
||||
oops:
|
||||
if (hnd != MIO_SYSHND_INVALID) close (hnd);
|
||||
if (side_chan != MIO_SYSHND_INVALID) close (side_chan);
|
||||
if (hnd != MIO_SYSHND_INVALID)
|
||||
{
|
||||
close (hnd);
|
||||
}
|
||||
if (side_chan != MIO_SYSHND_INVALID)
|
||||
{
|
||||
close (side_chan);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user