if ((fptr = fopen(filename, "r")) == NULL){
printf("file error message...\n");
} else {
dosomething...;
domore...;
}
You will need to declare the pointer to file and declare filename[] value.
Sorry, I took up C years ago and have forgotten a lot but this should help
you check the file. see man fopen
jay
On Fri, 12 Jul 2002, cana rich wrote:
> Hi,
>
> I tried to make a daemon which check if a file
> exist in a directory so I made a "fileopen" in "read"
> mode in a loop (while (1)...).
> That's why i have a segmentation fault.
> Is someone have an other method to do it without a
> segmentation fault?
>
> Thanks for your help.
>
> Canarich
--
blahblahblah
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list
- Re: Segmentation fault Jesus Ortega (a.k.a. Nitebirdz)
- Re: Segmentation fault Muhammad Faisal Rauf Danka
- HOWTO : change my IP address cana rich
- Re: HOWTO : change my IP address Anthony E. Greene
- Re: HOWTO : change my IP address Mike Burger
- RE: HOWTO : change my IP addr... hugo
- Re: HOWTO : change my IP ... Anthony E. Greene
- Re: HOWTO : change my IP address Ashwin Kutty
- Re: HOWTO : change my IP addr... Jerry Winegarden
- Segmentation fault cana rich
- Segmentation fault Jay Daniels
- Segmentation fault Toto Gamez
- Re: Segmentation fault Francisco Neira
- Re: Segmentation fault Toto Gamez
- segmentation fault Steven Going
- Re: segmentation fault fluke
- Segmentation Fault Dusko Knezevic
- Re: Segmentation Fault Michael Schwendt
- Segmentation fault Devon Harding - GTHLA
- Re: Segmentation fault Jason Dixon
- Re: Segmentation fault Samuel Flory
