printf "Here: %d %s\n" !count curline;flush Pervasives.stdout;
fprintf fifo_outchan "%s\n" curline;flush fifo_outchan
with
- | End_of_file|Sys_blocked_io|Unix_error(EPIPE,_,_) ->
+ | End_of_file|Sys_blocked_io|Unix_error(EPIPE,_,_)|Unix_error(EBADF,_,_) ->
begin
cont:=false
end
| Some(str)->
(
try openfile str [O_WRONLY;O_NONBLOCK] 0o777 with
- _->printf "Problemo:%s\n" str;flush Pervasives.stdout;stdout
+ _->printf "Output pipe not open, using stdout in place of %s\n" str;flush Pervasives.stdout;stdout
)
| None-> printf "Bug, nameless pipe\n";raise Bug
in