Questions tagged [epipe]

EPIPE is a return value (errno) when writing to a file under Unix system. Its an attempt to write to a broken pipe.

When a process ignores the SIGPIPE, the writing system call returns with an EPIPE error. So processes wanting to handle the broken pipe manually would typically ignore SIGPIPE and take action upon a EPIPE error.

SIGPIPE is for situations like this:

grep "pattern" < reallyhugefile | head

grep might print millions of lines, but head only reads 10 then quits. Once head closes the read-end and quits, grep gets SIGPIPE, which kills it, forcing it to quit early instead of processing the entire file uselessly.

If you don't want your program to be killed, handle or block SIGPIPE yourself. You will start getting write-errors with errno set to EPIPE instead.

https://unix.stackexchange.com/questions/84813/what-makes-a-unix-process-die-with-broken-pipe

32 questions
2
votes
1 answer

Issue with log redirection with nohup/supervise command

We have a node project and use nohup with supervise to supervise the node server. The command that we use is: nohup supervise /usr/share/$PACKAGE/superviseRun/supervise$NODE_PORT >> /var/log//sp-sms/$PACKAGE/supervise$NODE_PORT-$(date…
neeraj080
  • 119
  • 6
2
votes
3 answers

run a subprocess from ruby without waiting for it to return

Possible Duplicate: Spawn a background process in Ruby Spent a couple days poking at this. I was using ruby 1.8.7 from the OS until recently. I would call a subshell with backticks. The subshell was a bash wrapper that would call run any…
mike
  • 326
  • 1
  • 5
  • 14
1
vote
0 answers

Electron Error: write EPIPE at afterWriteDispatched

After building our Electron app on Mac we see a popup coming with below error, same app is working on windows without any error. Note: App keeps running but this error popup comes 4-5 time Uncaught Exception: Error: write EPIPE at…
1
vote
1 answer

How can i stop larger file uploads failing in my Flask app

I am trying to upload videos to my Flask app but I am getting errors every time i try to upload larger files When making this request curl --location --request POST 'http://192.168.1.217:5000/api/fileservice/0.1/files/upload_file' \ --form…
Sean
  • 587
  • 4
  • 20
1
vote
0 answers

Error: write EPIPE while using imagemagick To write a lambda function

var gm = require("gm").subClass({ imageMagick: true }); function conversion(image) { const image = gm(image); image.orientation(function(err, value) { if (err) { console.log("Error Occurred :",err); …
Tanjil
  • 11
  • 2
1
vote
1 answer

How to rescue/catch an "Error writing file: Broken pipe (Errno)" exception?

My Crystal program outputs to STDOUT and is typically piped into a pager like less. When the user terminates less before the full output is viewed, the application crashes with the following exception: Unhandled exception: Error writing file: Broken…
taylorthurlow
  • 2,953
  • 3
  • 28
  • 42
1
vote
1 answer

write after su command ROOT not working on android lollipop

i have a piece of code that works on Android 4.4.2 and below Android versions, but not in lollipop. I knew that when lollipop came out, a lot off apps that needed ROOT permission stop working, but i don't know how they solved its problem. This is…
user3583884
  • 103
  • 1
  • 7
1
vote
1 answer

EPIPE error does not appear?

Base on what I read about SIGPIPE, I made a test to try to produce the SIGPIPE issue. Here is the code for the server and the client: Server code: #include #include #include #include #include…
Hieu Nguyen
  • 382
  • 2
  • 15
1
vote
0 answers

Rails crash (Exception `Errno::EPIPE' - Broken pipe)

I my Rails servers crashes few times a day and I don't know what is the reason. This is what I get in logs when debug mode is turned on: [19/Aug/2013 11:28:50] "GET /apps/guess-the-model?q=pending HTTP/1.1" 200 - 141.0851 Exception `Errno::EPIPE' at…
ciembor
  • 7,189
  • 13
  • 59
  • 100
1
vote
0 answers

Node.js - write EPIPE error when running multiple requests

I'm writing a static web server using Node's 'net' module, and I've had some troubles running stress tests on it. This is the code of the test itself: var http = require("http"); http.globalAgent.maxSockets = 100000; var numOfRequests = 1000; var…
Udi
  • 93
  • 1
  • 1
  • 7
1
vote
0 answers

Is it possible to get EPIPE from write() to a file descriptor on an NFS disk?

My C++ application seems to have gotten an EPIPE errno result after a failing call to write(). The file descriptor passed to write() is for a file on an NFS mounted disk. The man page for write() describes EPIPE with: fd is connected to a pipe or…
WilliamKF
  • 41,123
  • 68
  • 193
  • 295
0
votes
1 answer

How do I wait for an EPIPE on Linux and Unix?

I'm writing a program on Linux in C, and I'd like to wait (using select or poll) for a pipe file descriptor to become broken, e.g. I'd like to wait up to the point when a subsequent write(2) would return EPIPE (or SIGPIPE would be sent). Adding the…
pts
  • 80,836
  • 20
  • 110
  • 183
0
votes
0 answers

Unable to upload file to S3 due to write EPIPE Networking Error

I'm having an issue when I try to upload a file to s3 bucket. According to the error message it is a networking error but I'm not sure why I got this error message. This issue does not happen consistently. Can someone help me with this? CODE async…
Tri Vi
  • 33
  • 1
  • 5
0
votes
1 answer

CGI from Apache, broken pipe

What does happen with Apache (or Nginx) running a CGI script when the client (I mean a browser or a TCP gateway) disconnects in the middle? Does Apache/Nginx log an error? (If yes, which one and where?) Is the CGI script sent SIGPIPE to?
porton
  • 5,214
  • 11
  • 47
  • 95
0
votes
1 answer

How to fix EPIPE after reconnecting to Server

I have a C socket client program where one thread is for receiving data and another for sending. If the server shuts down then the sender gets EPIPE. If I reconnect the same socket then it can receive data but the sender still gets EPIPE. How to fix…
nomem
  • 1,568
  • 4
  • 17
  • 33