pipecmd: reverse order of args to match documentation; add pipecmd_preserve.
[ccan] / ccan / pipecmd / test / run-fdleak.c
index 775ef333f8be42864fa4b65b247bc4420a4ed5a8..6b7729060e041fe6a339d729ec66539118b1cbd4 100644 (file)
@@ -21,7 +21,7 @@ int main(int argc, char *argv[])
 
        /* This is how many tests you plan to run */
        plan_tests(13);
-       child = pipecmd(&outfd, NULL, NULL, argv[0], "out", NULL);
+       child = pipecmd(NULL, &outfd, NULL, argv[0], "out", NULL);
        if (!ok1(child > 0))
                exit(1);
        ok1(read(outfd, buf, sizeof(buf)) == sizeof(buf));