summaryrefslogtreecommitdiff
path: root/src/libstddjb/open2.c
blob: 1d2682e88ed2a51ac781d88e62224b7ca34a8418 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* ISC license. */

#include <skalibs/nonposix.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>

int open2 (char const *s, unsigned int flags)
{
  int r ;
  do r = open(s, flags) ;
  while ((r == -1) && (errno == EINTR)) ;
  return r ;
}