question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

EBADF with streams and pipeline

See original GitHub issue

See https://github.com/raszi/node-tmp/issues/260

to address the comments: no you cannot catch the error using .catch or try/catch that was the point of this answer https://github.com/raszi/node-tmp/issues/260#issuecomment-719573863

Basically (I realise there is a language barrier) you cannot catch the error, at least nothing I did could.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
silkentrancecommented, Jan 14, 2021

detachDescriptor will cause tmp to not try to close the already closed file.

1reaction
rijnhardcommented, Jan 20, 2021

thats exactly it, I think node-tmp is not propagating it correctly, I’ll make a reproducible example

On Sun, 17 Jan 2021 at 12:29, Benjamin Gruenbaum notifications@github.com wrote:

There is no such thing as an “uncatchable EBADF” in Node.js as far as I know - the only way that could happen is if someone (either node-tmp or your code) is not propagating the error.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/raszi/node-tmp/issues/267#issuecomment-761767739, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABAXP2FPO5DIT4UGUO63WI3S2K3ZNANCNFSM4WCMQP4A .

Read more comments on GitHub >

github_iconTop Results From Across the Web

What's the difference between .pipe and pipeline on streams
pipe() is a method of Readable , while pipeline is a module method of stream that accepts streams to pipe. pipeline() method provide...
Read more >
pipeline causes script to silently crash #38539 - nodejs/node
stream.pipeline() leaves dangling event listeners on the streams after the callback has been invoked. ... [Error: EBADF: bad file descriptor, write] {
Read more >
6.2.2 Creating Pipes in C
Creating ``pipelines'' with the C programming language can be a bit more ... The child can then exec() another program, which inherits the...
Read more >
Node.js Stream.pipeline() Method - GeeksforGeeks
The stream.pipeline() method is a module method that is used to the pipe by linking the streams passing on errors and accurately cleaning...
Read more >
Using pipes as file streams, fdopen() - C code example
Computer Programming - C Programming Language - Using pipes as file streams, ... EBADF. fildes is not a valid open file descriptor, or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found