epipe

Filter out broken pipe errors from template execution

混江龙づ霸主 提交于 2020-01-13 19:28:15
问题 This is similar to Filter out broken pipe errors , but with complications - when a user presses the "stop" button on their browser while a template is executing (html/template.Execute or text/template.Execute), a broken pipe error occurs. However, I believe that the error returned by the text/template package is simply of type *errors.errorString as the broken pipe message appears to be wrapped in some other informational text and so no type assertion can be made to net.OpErr for comparison

Node.js - events.js:154 throw err write EPIPE; Program Crashing

一笑奈何 提交于 2019-12-18 05:15:08
问题 Trying to run my Node.js program, which has worked for a long time, and now it is suddenly... not. I'm trying to figure out the problem, and I figured it would be helpful if I posted here to try to track it down. Here's the log output: events.js:154 throw er; // Unhandled 'error' event ^ Error: write EPIPE at exports._errnoException (util.js:856:11) at WriteWrap.afterWrite (net.js:767:14) Quite frankly I have no clue why it's throwing an EPIPE error, I've checked that there's nothing running

Android: write failed: EPIPE (Broken pipe) Error on write file

馋奶兔 提交于 2019-12-17 18:51:38
问题 I was trying to take screenshot of the Android screen programatically. I had done the following code: private void getsnap(){ try{ Process sh = Runtime.getRuntime().exec("su", null, null); OutputStream os = sh.getOutputStream(); String filePath = this.getFilesDir().getPath().toString() + "/fileName1.jpeg"; os.write(("/system/bin/screencap -p " + filePath).getBytes("ASCII")); os.flush(); os.close(); sh.waitFor(); } catch (Exception e) { e.printStackTrace(); } } java.io.IOException: write

CGI from Apache, broken pipe

半腔热情 提交于 2019-12-13 04:28:07
问题 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? 回答1: There is no SIGPIPE when Apache CGI script is interrupted. Tested with the following code: #!/usr/bin/perl use strict; use warnings; $| = 1; #$SIG{PIPE} = "IGNORE"; $SIG{PIPE} = sub { open my $f, '>', 'log.txt'; print $f "PIPE: $ENV{SERVER_NAME}\n";

Filter out broken pipe errors

戏子无情 提交于 2019-12-01 15:58:50
I'm getting an error returned from an io.Copy call, to which I've passed a socket ( TCPConn ) as the destination. It's expected that the remote host will simply drop the connection when they've had enough, and I'm not receiving anything from them. When the drop occurs, I get this error: write tcp 192.168.26.5:21277: broken pipe But all I have is an error interface. How can I differentiate broken pipe errors from other kinds of error? if err.Errno == EPIPE... The broken pipe error is defined in the syscall package. You can use the equality operator to compare the error to the one in syscall.

Filter out broken pipe errors

萝らか妹 提交于 2019-12-01 14:32:45
问题 I'm getting an error returned from an io.Copy call, to which I've passed a socket ( TCPConn ) as the destination. It's expected that the remote host will simply drop the connection when they've had enough, and I'm not receiving anything from them. When the drop occurs, I get this error: write tcp 192.168.26.5:21277: broken pipe But all I have is an error interface. How can I differentiate broken pipe errors from other kinds of error? if err.Errno == EPIPE... 回答1: The broken pipe error is

Node.js - events.js:154 throw err write EPIPE; Program Crashing

三世轮回 提交于 2019-11-29 08:13:55
Trying to run my Node.js program, which has worked for a long time, and now it is suddenly... not. I'm trying to figure out the problem, and I figured it would be helpful if I posted here to try to track it down. Here's the log output: events.js:154 throw er; // Unhandled 'error' event ^ Error: write EPIPE at exports._errnoException (util.js:856:11) at WriteWrap.afterWrite (net.js:767:14) Quite frankly I have no clue why it's throwing an EPIPE error, I've checked that there's nothing running that could interfere and it's running in the exact same shell as it has before. If there's anything I