Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: R-2-14-branch
Fetching contributors…

Cannot retrieve contributors at this time

file 23 lines (19 sloc) 0.467 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

int main(int argc, char* argv[])
{
    int status = 0;
    char line[1000];

    printf("stdout 1\n"); fflush(stdout);
    fprintf(stderr, "stderr 1\n");
    fflush(stderr);

    if (argc > 1 && strcmp(argv[1], "1") == 0) {
while(fgets(line, 1000, stdin)) printf("stdin: %s", line);
fflush(stdout);
    }
    if (argc > 1 && strcmp(argv[1], "1")) {
status = atof(argv[1]);
    }
    
    exit(status);
}
Something went wrong with that request. Please try again.