Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

popen2 - duplex popen()

Like popen() but returns both child's stdin and stdout.

Usage

#include"popen2.h"
#include<stdio.h>

int main() {
    files_t *fp = popen2("cat");
    fputs("foobar\n", fp->in);
    fflush(fp->in);

    char buf[64] = {};
    fgets(buf, 64, fp->out);
    printf("%s", buf);

    pclose2(fp);
}

About

popen2() - bidirectional popen()

Topics

Resources

Releases

No releases published

Packages

No packages published

Languages