Skip to content

Detect I/O failures on Linux/Mac#11

Merged
jack-pappas merged 1 commit into
masterfrom
fix-sds-check-io-success
Oct 19, 2020
Merged

Detect I/O failures on Linux/Mac#11
jack-pappas merged 1 commit into
masterfrom
fix-sds-check-io-success

Conversation

@jack-pappas

@jack-pappas jack-pappas commented Oct 19, 2020

Copy link
Copy Markdown
Collaborator

On non-Windows platforms, detect whether calls to pread()/pwrite() succeed; when those calls fail, follow the existing pattern we have for the Windows-based code to print an error message and return 0. This change does not fully fix #10 but at least makes the behavior consistent between Windows and Linux/Mac -- read/write failures are detected and an error message is printed to stdout.

We'll still need a follow-up commit to bubble up these read/write failures through any functions calling SDSReadFileChunk and SDSWriteFileChunk, so we can ultimately raise a Python error and avoid returning a Dataset with uninitialized data.

@jack-pappas
jack-pappas force-pushed the fix-sds-check-io-success branch 3 times, most recently from a613e41 to ba25316 Compare October 19, 2020 17:42
On non-Windows platforms, detect whether calls to pread()/pwrite() succeed;
when those calls fail, follow the existing pattern we have for the Windows-based
code to print an error message and return 0. (We may want to make additional
improvements in this area, but at least Windows and Linux/Mac behavior are
now consistent).
@jack-pappas
jack-pappas force-pushed the fix-sds-check-io-success branch from ba25316 to cd740cf Compare October 19, 2020 20:52
@jack-pappas
jack-pappas marked this pull request as ready for review October 19, 2020 20:59
@jack-pappas
jack-pappas merged commit a78c7c9 into master Oct 19, 2020
@jack-pappas
jack-pappas deleted the fix-sds-check-io-success branch May 6, 2022 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SDS read/write routines fail to detect errors

1 participant