OS: Windows 2000
Cygwin bash version "2.05b.0(9)"
My application is a combination of Fortran and C.
In Fortran Stdout's number is 6.
When I ran the application from the Cygwin console it is giving the
problem and exited.
where there is a write statement to the stdout.
*************************************************
Input/Output Error 179: Bad file descriptor
In Procedure: openwt
At Line: 562
Statement: Formatted WRITE
Unit: 6
Connected To: Stdin
End of diagnostics
*************************************************
And then I typed the command "bash" (gone into one more level deeper),
then it worked.
And tried again one more step deeper ($SHLVL = 3) it gave the same
problem.
I kept on going deeper and deeper and my observation is...
For all odd SHLVL values it is failing(giving the above error message)
For all even SHLVL values it is succeeding.
The strange thing is when I ran from the remote shell. My "rsh" shell is
set to use "/usr/bin/bash"
I ran the application on remote shell (using rsh) then the application
is running properly.
In all levels of SHLVL, it is running properly.
Can you please suggest us a solution to solve this problem?