Superuser/jni/su/pts.c
/**
 * Pump data from input FD to output FD. If close_output is
 * true, then close the output FD when we're done.
 */
Pump data from input FD to output FD. If close_output is
true, then close the output FD when we're done.
Pump data from input FD to output FD . If close_output is true then close the output FD when we ' re done .
static void pump_ex(int input, int output, int close_output) {
    char buf[4096];
    int len;
    while ((len = read(input, buf, 4096)) > 0) {
        if (write_blocking(output, buf, len) == -1) break;
    }
    close(input);
    if (close_output) close(output);
}
static void pump_ex ( int input , int output , int close_output ) { char buf [ 4096 ] ; int len ; while ( ( len = read ( input , buf , 4096 ) ) > 0 ) { if ( write_blocking ( output , buf , len ) == -1 ) break ; } close ( input ) ; if ( close_output ) close ( output ) ; }
Pump data from input FD to output FD.
Pump data from input FD to output FD .