pike.git/
src/
lex.c
Branch:
Tag:
Non-build tags
All tags
No tags
1995-11-01
1995-11-01 23:14:50 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
743370d5fb710a554f47c8b00614dd4d8f8182bf (
16
lines) (+
14
/-
2
)
[
Show
|
Annotate
]
Branch:
branches/E-12
close() and open() now checks for EINTR
Rev: src/lex.c:1.3
27:
#include <math.h> #include <fcntl.h> #include <errno.h>
+
#ifdef HAVE_TIME_H
#include <time.h>
-
+
#endif
#define LEXDEBUG 0 #define EXPANDMAX 50000
363:
static void free_inputstate(struct inputstate *i) { if(!i) return;
-
if(i->fd>=0) close(i->fd);
+
if(i->fd>=0)
+
{
+
retry:
+
if(
close(i->fd)
< 0)
+
if(errno == EINTR)
+
goto retry
;
+
}
if(i->data && !i->dont_free_data) free(i->data); free_inputstate(i->next); free((char *)i);
946:
return; }
+
retry:
fd=open(sp[-1].u.string->str,O_RDONLY); if(fd < 0) {
-
+
if(errno == EINTR) goto retry;
+
my_yyerror("Couldn't open file to include '%s'.",sp[-1].u.string->str); return; }