Skip to content

Should readViaStream/writeViaStream check fd is in descriptors list? #219

@russthom

Description

@russthom

Both readViaStream:

readViaStream(fd, offset) {

and writeViaStream:

writeViaStream(fd, offset) {

Check the fd is in the descriptors list before proceeding (otherwise they throw 'bad-descriptor'):

However, since both these functions use ReadableFileStream/WriteableFileStream and use the hostFd:

constructor (hostFd, position) {

Do we need this check? Aren't they just dealing with reading/writing to host files via stream, and there is no need for check here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions