I'm writing this program so to make a workaround in this issue: Why do I get 'Bad file descriptor' when trying sys.stdin.read() in subversion pre-revprop-change py script?
Note:
- Content from STDIN may be arbitrary binary data.
- Please use C++ STL functions, iostream, ifstream etc .
- If the file creation/writing failed, I'd like to catch the exception to know the case.