I'm using the access function to try to check if a file exists, but it appears like it's causing a segfault. I have a loop like
GDB is showing a seg fault at the do{ line. Is there some trick to using this function? Do I need to link some library for it to work?Code:int fileExists = F_OK; do{ fileExists = access(relPath, F_OK); sleep(1); while(fileExists != F_OK);



1Likes
LinkBack URL
About LinkBacks



