[Bug 186114] net/mpd5 hangs after a certain number of users connect
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Jun 28 12:35:48 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=186114
--- Comment #85 from Cassiano Peixoto <peixoto.cassiano at gmail.com> ---
(In reply to Eugene Grosbein from comment #84)
Hi Eugene,
Don't worry, no problem.
I tried to apply Konstantin patch but i had some rejects:
# cat lib/libc/stdio/fgets.c.rej
@@ -53,17 +53,17 @@
fgets(char * __restrict buf, int n, FILE * __restrict fp)
{
size_t len;
- char *s;
+ char *s, *ret;
unsigned char *p, *t;
- FLOCKFILE(fp);
+ FLOCKFILE_CANCELSAFE(fp);
ORIENT(fp, -1);
if (n <= 0) { /* sanity check */
fp->_flags |= __SERR;
errno = EINVAL;
- FUNLOCKFILE(fp);
- return (NULL);
+ ret = NULL;
+ goto end;
}
s = buf;
@@ -76,8 +76,8 @@
if (__srefill(fp)) {
/* EOF/error: stop with partial or no line */
if (!__sfeof(fp) || s == buf) {
- FUNLOCKFILE(fp);
- return (NULL);
+ ret = NULL;
+ goto end;
}
break;
}
# cat lib/libc/stdio/fgetwln.c.rej
@@ -45,13 +45,14 @@
wchar_t *
fgetwln_l(FILE * __restrict fp, size_t *lenp, locale_t locale)
{
+ wchar_t *ret;
wint_t wc;
size_t len;
int savserr;
FIX_LOCALE(locale);
- FLOCKFILE(fp);
+ FLOCKFILE_CANCELSAFE(fp);
ORIENT(fp, 1);
savserr = fp->_flags & __SERR;
# cat lib/libc/stdio/fgetws.c.rej
@@ -46,14 +46,14 @@
fgetws_l(wchar_t * __restrict ws, int n, FILE * __restrict fp, locale_t
locale)
{
int sret;
- wchar_t *wsp;
+ wchar_t *wsp, *ret;
size_t nconv;
const char *src;
unsigned char *nl;
FIX_LOCALE(locale);
struct xlocale_ctype *l = XLOCALE_CTYPE(locale);
- FLOCKFILE(fp);
+ FLOCKFILE_CANCELSAFE(fp);
ORIENT(fp, 1);
if (n <= 0) {
@@ -113,12 +113,14 @@
goto error;
ok:
*wsp = L'\0';
- FUNLOCKFILE(fp);
+ ret = ws;
+end:
+ FUNLOCKFILE_CANCELSAFE();
return (ws);
error:
- FUNLOCKFILE(fp);
- return (NULL);
+ ret = NULL;
+ goto end;
}
wchar_t *
Should i update to latest FreeBSD-11 STABLE? I'm using 11.0-p0.
Thanks
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the freebsd-net
mailing list