Hi,

I observed that here fopen was successful. And I am able
to simulate this problem on only one machine.. it works
fine on other machines. I would like to know whether I am
missing any patches.

Thanks,
Rajesh.
-----Original Message-----
From: Thomas B�tzler <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Cc: 'Venkata Rajesh Velamakanni' <[EMAIL PROTECTED]>
Date: Monday, July 24, 2000 7:51 PM
Subject: RE: Query on linking libraries


Hi,

> Venkata Rajesh Velamakanni [SMTP:[EMAIL PROTECTED]] asked:
>
> This is regarding a query on linking libraries.
> I would like to know whether anyone has faced
> this problem.
>
> I have a application, in which I open a file(test1),
> and then I am calling a function defined in My library.
> Inside this function I am trying open someother file
> (test2) and then closing the file. While closing this
> file(test2).. it errors out saying "Segmentation fault".
>
[...]
>
>
Does test2 exist? You open it in read mode and close it
without testing that the open was successful. Try this:

>
> Library.c
>
> #include <stdio.h>
>
> void
> library() {
>
if( f=fopen("test2","r") ){
fclose(f);
} else {
printf("Open in library() failed!\n");
}
> }
>
HTH,
--
Thomas B�tzler, System Administrator, Network Operations EMEA
Harbinger, e-Business Connectivity Group, a part of Peregrine
Steinh�userstra�e 22                 phone: +49-721-98143-110
D-76135 Karlsruhe / Germany            fax: +49-721-98143-196


Reply via email to