Make synchronous transfer APIs robust against signal interruption
authorDavid Moore <dcm@acm.org>
Thu, 28 May 2009 06:15:54 +0000 (23:15 -0700)
committerDaniel Drake <dsd@gentoo.org>
Fri, 29 May 2009 15:21:11 +0000 (11:21 -0400)
commitcad5cb55c37137e94e35c74fdabfe42a5cbd229b
treef3b70f0260e2ef8d33bdccb60ac004253d811f49
parentb501795985a23109f176d296e7b544b4c6354528
Make synchronous transfer APIs robust against signal interruption

libusb_control_transfer and libusb_bulk_transfer are designed to be
synchronous such that control is not returned until the transfer
definitively succeeds or fails.  That assumption is violated if a signal
interrupts these functions because there is no way for the application
to continue waiting for the transfer without resubmitting it.  This
patch changes these synchronous APIs so they do not abort in the case of
a signal interruption.

Signed-off-by: David Moore <dcm@acm.org>
libusb/sync.c