~snappy-dev/snapcraft/core

« back to all changes in this revision

Viewing changes to examples/libpipeline/test.c

  • Committer: Michael Terry
  • Date: 2015-06-24 12:55:09 UTC
  • Revision ID: michael.terry@canonical.com-20150624125509-8d29e9nnahm5he3m
switch readline to pipeline example, with surrounding c code

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <pipeline.h>
 
2
 
 
3
int main()
 
4
{
 
5
    pipeline *p;
 
6
    int status;
 
7
 
 
8
    p = pipeline_new ();
 
9
    pipeline_command_args (p, "ls", NULL);
 
10
    pipeline_command_args (p, "grep", "s", NULL);
 
11
    pipeline_command_args (p, "grep", "t", NULL);
 
12
    status = pipeline_run (p);
 
13
 
 
14
    return status;
 
15
}