mirror of
https://github.com/NikitaIvanovV/ctpv.git
synced 2024-11-24 13:53:07 +01:00
Minor
This commit is contained in:
parent
98770e2842
commit
302c77245b
@ -115,8 +115,6 @@ static void check_init_previews(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CMD_ERR_BUF 256
|
|
||||||
|
|
||||||
static int run(Preview *p, int *exitcode)
|
static int run(Preview *p, int *exitcode)
|
||||||
{
|
{
|
||||||
int pipe_fds[2];
|
int pipe_fds[2];
|
||||||
@ -132,9 +130,9 @@ static int run(Preview *p, int *exitcode)
|
|||||||
close(pipe_fds[1]);
|
close(pipe_fds[1]);
|
||||||
|
|
||||||
if (*exitcode != FAILED_PREVIEW_EC) {
|
if (*exitcode != FAILED_PREVIEW_EC) {
|
||||||
char buf[CMD_ERR_BUF];
|
char buf[256];
|
||||||
int len;
|
int len;
|
||||||
while ((len = read(pipe_fds[0], buf, CMD_ERR_BUF)) > 0) {
|
while ((len = read(pipe_fds[0], buf, LEN(buf))) > 0) {
|
||||||
write(STDOUT_FILENO, buf, len);
|
write(STDOUT_FILENO, buf, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user