Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while reading from a pipe with an InputStream #401

Closed
DartBot opened this issue Nov 9, 2011 · 7 comments
Closed

Error while reading from a pipe with an InputStream #401

DartBot opened this issue Nov 9, 2011 · 7 comments
Assignees
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-io os-linux
Milestone

Comments

@DartBot
Copy link

DartBot commented Nov 9, 2011

This issue was originally filed by rchandia@google.com


Problem is that FileInputStream assumes the file is seekable.

void main() {

  File stdinFile = new File('/proc/self/fd/0');
  stdinFile.open();
  InputStream stdin = stdinFile.openInputStream();

  void readMore() {
    print(stdin.read(1));
  }

  stdin.dataHandler = readMore;
  readMore();
}

Produces:
An unhandled exception has been thrown
FileIOException: length failed
 0. Function: '_File@689f3ad.lengthSync' url: './dart:builtin-lib' line:1382 col:7
 1. Function: '_FileInputStream@689f3ad.available' url: './dart:builtin-lib' line:642 col:28
 2. Function: '_FileInputStream@689f3ad.read' url: './dart:builtin-lib' line:611 col:32
 3. Function: 'readMore' url: '/tmp/stdin.dart' line:7 col:21
 4. Function: 'main' url: '/tmp/stdin.dart' line:11 col:11

@DartBot
Copy link
Author

DartBot commented Nov 9, 2011

This comment was originally written by rchandia@google.com

@iposva-google
Copy link
Contributor

Set owner to @madsager.
Added Accepted label.

@madsager
Copy link
Contributor

Removed Area-VM label.
Added Area-IO label.

@madsager
Copy link
Contributor

madsager commented Jun 7, 2012

Added this to the Later milestone.

@andersjohnsen
Copy link

Set owner to @Skabet.

@andersjohnsen
Copy link

Fix landed in r20768.


Removed this from the Later milestone.
Added this to the M4 milestone.
Added Fixed label.

@kevmoo
Copy link
Member

kevmoo commented May 14, 2014

Removed Area-IO label.
Added Area-Library, Library-IO labels.

@DartBot DartBot added Type-Defect os-linux area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-io labels May 14, 2014
@DartBot DartBot added this to the M4 milestone May 14, 2014
copybara-service bot pushed a commit that referenced this issue Jan 2, 2024
…watcher, yaml, yaml_edit

Revisions updated by `dart tools/rev_sdk_deps.dart`.

crypto (https://github.com/dart-lang/crypto/compare/63e9a90..f2efb98):
  f2efb98  2024-01-02  Kevin Moore  Require Dart 3.2, update and fix lints (#158)

logging (https://github.com/dart-lang/logging/compare/324a0b5..4d35a4e):
  4d35a4e  2024-01-01  dependabot[bot]  Bump actions/stale from 8.0.0 to 9.0.0 (#152)

mime (https://github.com/dart-lang/mime/compare/56359b0..ca9f059):
  ca9f059  2024-01-01  dependabot[bot]  Bump actions/stale from 8.0.0 to 9.0.0 (#111)

path (https://github.com/dart-lang/path/compare/115ea2a..57a049c):
  57a049c  2024-01-01  dependabot[bot]  Bump actions/stale from 8.0.0 to 9.0.0 (#157)
  5b6aac7  2023-12-20  Kevin Moore  blast_repo fixes (#156)

pool (https://github.com/dart-lang/pool/compare/3c1bd42..4c49000):
  4c49000  2024-01-01  dependabot[bot]  Bump actions/stale from 8.0.0 to 9.0.0 (#79)
  7e03d80  2023-12-20  Kevin Moore  blast_repo fixes (#78)

shelf (https://github.com/dart-lang/shelf/compare/b3adc7c..733588f):
  733588f  2024-01-01  dependabot[bot]  Bump actions/stale from 8.0.0 to 9.0.0 (#401)
  1eab426  2024-01-01  dependabot[bot]  Bump actions/labeler from 4.3.0 to 5.0.0 (#402)
  10cbffe  2023-12-14  Kevin Moore  Run web tests with wasm with dev Dart sdk (#398)

stack_trace (https://github.com/dart-lang/stack_trace/compare/4abff44..0f4710c):
  0f4710c  2024-01-01  dependabot[bot]  Bump actions/stale from 8.0.0 to 9.0.0 (#148)

tools (https://github.com/dart-lang/tools/compare/ed81684..2f59ab4):
  2f59ab4  2024-01-02  Daco Harkes  [graphs] Clean up lints for Dart 3.3 (#221)
  01fa883  2024-01-01  dependabot[bot]  Bump actions/stale from 8.0.0 to 9.0.0 (#223)
  9d4fe2f  2024-01-01  dependabot[bot]  Bump actions/labeler from 4.3.0 to 5.0.0 (#222)
  6d260b8  2023-12-14  Elias Yishak  Update USAGE_GUIDE to update the `flutterChannelCount` key in `LogFileStats` (#219)
  56a30ce  2023-12-11  Elias Yishak  Add `enabledFeatures` key to `Analytics` constructors (#217)

watcher (https://github.com/dart-lang/watcher/compare/dc45f19..66cd694):
  66cd694  2024-01-01  dependabot[bot]  Bump actions/stale from 8.0.0 to 9.0.0 (#161)
  679d308  2023-12-20  Kevin Moore  blast_repo fixes (#160)

yaml (https://github.com/dart-lang/yaml/compare/98a3aab..509fd72):
  509fd72  2023-12-11  Kevin Moore  update lints, require Dart 3.0 (#156)

yaml_edit (https://github.com/dart-lang/yaml_edit/compare/9b9d33c..47eb20e):
  47eb20e  2024-01-01  dependabot[bot]  Bump actions/stale from 8.0.0 to 9.0.0 (#63)
  a39ec39  2023-12-20  Kevin Moore  blast_repo fixes (#62)

Change-Id: I8009f4957a0eb751f36c2ec1be8aacbfc44ca586
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/344400
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-io os-linux
Projects
None yet
Development

No branches or pull requests

5 participants