Commits

Evan Gates  committed 55a44e5

change stat() to access()

  • Participants
  • Parent commits e3d5d96

Comments (0)

Files changed (1)

 	int fd = 0;
 	char out[PATH_MAX], in[PATH_MAX], path[PATH_MAX], channel[32];
 	char *cmd[] = CMD; // from config.h
-	struct stat st;
 
 	if (w->pid)
 		return;
 	sprintf(in,  "%s/in",  w->path);
 
 	// open() to see if ii has the fifo open for reading
-	if (stat(out, &st) < 0 || stat(in, &st) < 0 || (fd = open(in, O_WRONLY | O_NONBLOCK)) < 0)
+	if (access(out, F_OK) < 0 || access(in, F_OK) < 0 || (fd = open(in, O_WRONLY | O_NONBLOCK)) < 0)
 		return;
 
 	close(fd);