We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc6863f commit d95f488Copy full SHA for d95f488
1 file changed
tests/test_pipe_fitter.c
@@ -23,6 +23,7 @@
23
#include <fcntl.h>
24
#include <stdio.h>
25
#include <string.h>
26
+#include <err.h>
27
28
#include <gtextutils/pipe_fitter.h>
29
#include "tests_assertion.h"
@@ -36,10 +37,13 @@ int main()
36
37
char temp[1000];
38
char str[1000];
39
int n ;
40
+ int i ;
41
42
//Pipe output through a GZIP program
43
fd = pipe_output_command ( "gzip", "pipe_out.txt.gz", &pid ) ;
- write ( fd, text, strlen(text)) ;
44
+ i = write ( fd, text, strlen(text)) ;
45
+ if ( i == -1 )
46
+ err(1,"write failed");
47
pipe_close(fd, pid);
48
49
0 commit comments