pipecmd: fix warn-unused-result warnings (-O2)
[ccan] / ccan / pipecmd / _info
index 4621d72fc3b94d78192a8eb33fb9bec60309a600..a560bfea05ccc4e53807dde67d0546c48b6f0246 100644 (file)
@@ -28,7 +28,8 @@
  *     char input[12];
  *
  *     if (argc == 2) {
- *             write(STDOUT_FILENO, "hello world\n", 12);
+ *             if (write(STDOUT_FILENO, "hello world\n", 12) != 12)
+ *                     exit(1);
  *             exit(0);
  *     }
  *     child = pipecmd(&outputfd, NULL, NULL, argv[0], "ignoredarg", NULL);