[comp.sys.concurrent] duplicate filedes for open file

mchinni@pica.army.mil (Michael J. Chinni, SMCAR-CCS-E) (02/12/90)

Thanks to all who responded with help for my problem (get a C "FILE *ptr" for an
FORTRAN opened file).

The gist of the responces were search thru all possible fildes for the
appropriate one. While this would work, I found another solution.

I initiallly didn't want to re-open the file in the C routine (I thought that
this would cause problems). I have since tried this and found no problem. 

Therefore, that is what I have done. My C routine does the following:
	take as a parameter the filename to be opened,
	copies the name into a C string (and adds a '\0')
	opens the file
	does the read
	closes the file.

This works fine.

Thanks again.

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
			    Michael J. Chinni
      Chief Scientist, Simulation Techniques and Workplace Automation Team
	 US Army Armament Research, Development, and Engineering Center
 User to skeleton sitting at cobweb   () Picatinny Arsenal, New Jersey  
    and dust covered workstation      () ARPA: mchinni@pica.army.mil
      "System been down long?"        () UUCP: ...!uunet!pica.army.mil!mchinni
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/


Articles to: concurrent@soma.bcm.tmc.edu or uunet!soma.bcm.tmc.edu!concurrent
Administrative stuff: concurrent-request@soma.bcm.tmc.edu
Stan Barber, Moderator