# # # patch "unix/process.cc" # from [04e4acb200ae781f7b94bef190f2972179504424] # to [cf599e8f9f8dd9865bd7e867eefa3ed3b8f57998] # # patch "win32/process.cc" # from [993e5bdc06b7b7aa5fa5236e635bc97f37020968] # to [41614776a159bc9ece78cdceacf852c13c497c56] # ============================================================ --- unix/process.cc 04e4acb200ae781f7b94bef190f2972179504424 +++ unix/process.cc cf599e8f9f8dd9865bd7e867eefa3ed3b8f57998 @@ -116,6 +116,8 @@ redir::redir(int which, char const * fil redir::redir(int which, char const * file) : savedfd(-1), fd(which) { + if (!file || *file == '\0') + return; int tempfd = open(file, (which==0?O_RDONLY:O_WRONLY|O_CREAT|O_TRUNC), 0664); if (tempfd == -1) { ============================================================ --- win32/process.cc 993e5bdc06b7b7aa5fa5236e635bc97f37020968 +++ win32/process.cc 41614776a159bc9ece78cdceacf852c13c497c56 @@ -158,6 +158,11 @@ redir::redir(int which, char const * fil redir::redir(int which, char const * filename) : what(which) { + if (!filename || *filename == '\0') + { + what = -1; + return; + } HANDLE file; SECURITY_ATTRIBUTES sa; sa.nLength = sizeof(SECURITY_ATTRIBUTES);