fork download
  1. #include <stdio.h>
  2. int main(int argc, char *argv[])
  3. {
  4. FILE *fp = fopen("thisisatest.txt", "w+");
  5. if (!fp) {
  6. perror(argv[0]);
  7. return 1;
  8. }
  9. fputs("I'm SURE this is blocked, but...", fp);
  10. fclose(fp);
  11. return 0;
  12. }
Runtime error #stdin #stdout #stderr 0s 2420KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
./prog: Permission denied