Check-in [2c6dd452d1]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Handle EINTR
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | scgi
Files: files | file ages | folders
SHA1:2c6dd452d13cec0bcc8ed3e7d07f4ea8c85cc073
User & Date: bapt 2015-05-17 21:38:17
Context
2015-05-17
22:11
Remove debugging informations check-in: 759e9a77b3 user: bapt tags: scgi
21:38
Handle EINTR check-in: 2c6dd452d1 user: bapt tags: scgi
2015-04-24
17:00
I said the real socket check-in: 28631ced3c user: bapt tags: scgi
Changes

Changes to web/main.c.

153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
	memset(&pfd, 0, sizeof(pfd));
	pfd.fd = fd;
	pfd.events = POLLIN|POLLERR;

	for (;;) {
		pfd.revents = 0;
		if (poll(&pfd, 1, -1) < 0) {
			if (errno == EAGAIN)
				continue;
			err(EXIT_FAILURE, "An error occured");
		}
		if (! (pfd.revents & POLLIN))
			continue;

		clfd = accept(pfd.fd, NULL, NULL);







|







153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
	memset(&pfd, 0, sizeof(pfd));
	pfd.fd = fd;
	pfd.events = POLLIN|POLLERR;

	for (;;) {
		pfd.revents = 0;
		if (poll(&pfd, 1, -1) < 0) {
			if (errno == EAGAIN || errno == EINTR)
				continue;
			err(EXIT_FAILURE, "An error occured");
		}
		if (! (pfd.revents & POLLIN))
			continue;

		clfd = accept(pfd.fd, NULL, NULL);