Do not unconditionally fork() after accept(). accept() can return -1 due
authorMatthew Dillon <dillon@dragonflybsd.org>
Mon, 20 Sep 2004 00:58:36 +0000 (00:58 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Mon, 20 Sep 2004 00:58:36 +0000 (00:58 +0000)
commitd8b3dd1cabc1c8b80910734404523e311e34afbf
tree179992d2c9eb0b091d89dafa437b3ba6440dc857
parente4fc90e8edbb8b0e53fb4d09d51e116d4bbd13de
Do not unconditionally fork() after accept().  accept() can return -1 due
to an interrupted system call (i.e. SIGCHLD).  If we fork in that case
ftpd can get into an accept()/SIGCHLD/fork/[fail]/repeat loop.

Reported-by: fabian <fabian.duelli@bluewin.ch>
libexec/ftpd/ftpd.c