mirror of
https://github.com/NikitaIvanovV/ctpv.git
synced 2024-11-28 07:23:07 +01:00
Ignore 141 error code
Apparently it means process was terminated with SIGPIPE and we want to ignore this error because lf sends this signal when enough lines of input are read
This commit is contained in:
parent
f0204c359e
commit
46a00e4d4e
@ -8,6 +8,7 @@
|
|||||||
#include "preview.h"
|
#include "preview.h"
|
||||||
|
|
||||||
#define FAILED_PREVIEW_EC NOTEXIST_EC
|
#define FAILED_PREVIEW_EC NOTEXIST_EC
|
||||||
|
#define ENOUGH_READ_EC 141
|
||||||
|
|
||||||
#define PREVP_SIZE sizeof(Preview *)
|
#define PREVP_SIZE sizeof(Preview *)
|
||||||
|
|
||||||
@ -192,9 +193,13 @@ run:
|
|||||||
}
|
}
|
||||||
|
|
||||||
ERRCHK_RET_OK(run(p, &exitcode));
|
ERRCHK_RET_OK(run(p, &exitcode));
|
||||||
if (exitcode == FAILED_PREVIEW_EC) {
|
switch (exitcode) {
|
||||||
|
case FAILED_PREVIEW_EC:
|
||||||
i++;
|
i++;
|
||||||
goto run;
|
goto run;
|
||||||
|
case ENOUGH_READ_EC:
|
||||||
|
exitcode = 0;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return exitcode == 0 ? OK : ERR;
|
return exitcode == 0 ? OK : ERR;
|
||||||
|
Loading…
Reference in New Issue
Block a user