b5310f8128c85563bf2f99f30e833eb59455f6e1
3 * check whether a file exists
5 * \param fn the file name
7 * \return Non-zero iff file exists.
9 int file_exists(const char *fn
)
13 return !stat(fn
, &statbuf
);
16 int para_select(int n
, fd_set
*readfds
, fd_set
*writefds
,
17 struct timeval
*timeout
)
21 ret
= select(n
, readfds
, writefds
, NULL
, timeout
);
23 } while (ret
< 0 && errno
== EINTR
);
25 PARA_CRIT_LOG("select error (%s)\n", strerror(err
));