* Desperately seeking help with VAXCRTL fopen
@ 1990-04-28 0:25 Bob Armstrong
1990-04-30 23:35 ` Bob Armstrong
0 siblings, 1 reply; 4+ messages in thread
From: Bob Armstrong @ 1990-04-28 0:25 UTC (permalink / raw)
I have a C program in which calls to fopen are failing. The errno ends up
set to EVMSERR, and the vaxc$errno is RMS$_CHN, which says that the $ASSIGN
service failed.
In a real (aka VMS) program, I would simply look at the STV field in the FAB
to find out why the $OPEN failed, but of course this is a Un*x program. The
question is, how do I find the FAB that fopen is using so that I can determine
the cause of the error ? Is there another way to find the STV field from
the last fopen ?
Thanks much (they really want this program running)
----------------------------------------------------------------------------
| Bob Armstrong | I'm sitting here on the LCG SIG bench, 'cause |
| Teradyne/EDA West | you want to know if I'm braindamaged enough to |
| {decwrl,sun}!teda!bob | trade my PDP-10 for partial credit on a system |
| Phone: (408) 980-5263 | that doesn't even handle filename completion ? |
----------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Desperately seeking help with VAXCRTL fopen
1990-04-28 0:25 Desperately seeking help with VAXCRTL fopen Bob Armstrong
@ 1990-04-30 23:35 ` Bob Armstrong
0 siblings, 0 replies; 4+ messages in thread
From: Bob Armstrong @ 1990-04-30 23:35 UTC (permalink / raw)
In article <2816@teda.UUCP>, bob@teda.UUCP (Bob Armstrong) writes:
>
> I have a C program in which calls to fopen are failing. The errno ends up
> set to EVMSERR, and the vaxc$errno is RMS$_CHN, which says that the $ASSIGN
> service failed.
> [... etc ...]
Thanks to those who responded to this problem.
As it turns out, there is a bug in the VAXCRTL access, fopen and open
functions. If you try to access a file which via a search list logical,
CRTL leaves one open channel for each element in the search list which
fails to contain the file. Obviously it has a problem in cleaning up
after itself. If you only do a few of these then there is no problem,
but if you do enough then you will eventually run out of open channels.
After that you can't open anything.
We have a relatively old C compiler, version 2.4, so this may be a problem
that has been fixed.
----------------------------------------------------------------------------
| Bob Armstrong | I'm sitting here on the LCG SIG bench, 'cause |
| Teradyne/EDA West | you want to know if I'm braindamaged enough to |
| {decwrl,sun}!teda!bob | trade my PDP-10 for partial credit on a system |
| Phone: (408) 980-5263 | that doesn't even handle filename completion ? |
----------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Desperately seeking help with VAXCRTL fopen
@ 1990-05-01 14:01 My name is...
0 siblings, 0 replies; 4+ messages in thread
From: My name is... @ 1990-05-01 14:01 UTC (permalink / raw)
In article <2816@teda.UUCP>, bob@teda.UUCP (Bob Armstrong) writes...
> The
>question is, how do I find the FAB that fopen is using so that I can determine
>the cause of the error ? Is there another way to find the STV field from
>the last fopen ?
>
#include stdio
#include rab;
#include fab;
#include nam;
#define fcb_l_rab 0x0f4; /* This offset might change depending on vms
version. It works for 5.4. */
struct FAB *fabptr;
struct RAB *rabptr;
struct NAM *namptr;
FILE fp;
int *mp;
main()
{
int fn = 0;
fp = fopen("stuff.dat","w");
mp = fp;
rabptr = *mp + fcb_l_rab;
printf("RAB.BID = %x.RAB.BLN = %x. RAB.FAB = %x. \n",
rabptr->rab$b_bid,rabptr->rab$b_bln,rabptr->rab$l_fab);
fabptr = rabptr->rab$l_fab;
printf("FAB.BID = %x.FAB.BLN = %x. FAB.NAM = %x. \n",
fabptr->fab$b_bid,fabptr->fab$b_bln,fabptr->fab$l_nam);
namptr = fabptr->fab$l_nam;
printf("Per NAM block, file name string is %.*s. \n",
namptr->nam$b_rsl,namptr->nam$l_rsa);
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Desperately seeking help with VAXCRTL fopen
@ 1990-05-02 14:48 My name is...
0 siblings, 0 replies; 4+ messages in thread
From: My name is... @ 1990-05-02 14:48 UTC (permalink / raw)
In article <2926@teda.UUCP>, bob@teda.UUCP (Bob Armstrong) writes...
> We have a relatively old C compiler, version 2.4, so this may be a problem
>that has been fixed.
>
If the problem is in the CRTL, then it will not be fixed by upgrading the
compiler. The CRTL is maintained by the C developers, but it is shipped with
VMS, not C. The solution, if the problem is in the CRTL is to upgrade and see
what that will do or not use a search list. Another option is to get into the
RMS data structures and release the channels yourself.
scott
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1990-05-02 14:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1990-04-28 0:25 Desperately seeking help with VAXCRTL fopen Bob Armstrong
1990-04-30 23:35 ` Bob Armstrong
-- strict thread matches above, loose matches on Subject: below --
1990-05-01 14:01 My name is...
1990-05-02 14:48 My name is...
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox