Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unit number limit?

0 views
Skip to first unread message

ste...@tekgen.uucp

unread,
May 23, 1986, 4:11:58 PM5/23/86
to

Does anyone know a way to get around the limit of 20
unit numbers in UNIX 4.2 FORTRAN?

I understand that C allows 31 or so.

--thanks in advance

Steve Rogers
....tektronix!tekgen!stever

da...@ztivax.uucp

unread,
Jun 16, 1986, 5:46:00 AM6/16/86
to
>stever@tekgen

>Does anyone know a way to get around the limit of 20
>unit numbers in UNIX 4.2 FORTRAN?
>
>I understand that C allows 31 or so.

Nope, that is a function of the file descriptors you can have open in
UNIX 4.2: 0-19 (maybe 1-20 in f77, i dunno).

(flame me not - this is NOT some magic UNIX standard limit, , but it IS
a common implementation limit, and its for all the UNIXes I have
seen).

If you want lots of files open, use FILE pointers (is there a way to
get them from f77? in C we use fopen() instead of open() ).

da...@ztivax.uucp

unread,
Jun 16, 1986, 7:28:00 AM6/16/86
to
Ooops! I just checked the sources, and fopen() DOES still use
descriptors (it actually calls open()), so you can still only open 20
files on your vanilla 4.2 or sysV implementation.

Daniel R. Levy

unread,
Jun 20, 1986, 9:10:34 PM6/20/86
to

I would HOPE that fopen() still uses descriptors (the OS provides no other way
to stuff input into a file, except maybe mucking with the device con-
taining the files [look ma, several files, one descriptor, system crash!] :-)).

No need to "check the sources" to know THAT!
--
------------------------------- Disclaimer: The views contained herein are
| dan levy | yvel nad | my own and are not at all those of my em-
| an engihacker @ | ployer or the administrator of any computer
| at&t computer systems division | upon which I may hack.
| skokie, illinois |
-------------------------------- Path: ..!{akgua,homxb,ihnp4,ltuxa,mvuxa,
vax135}!ttrdc!levy

0 new messages