From owner-freebsd-bugs Tue May 30 13:50:10 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id BE37A37B73C for ; Tue, 30 May 2000 13:50:00 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id NAA27655; Tue, 30 May 2000 13:50:00 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from bubba.whistle.com (bubba.whistle.com [207.76.205.7]) by hub.freebsd.org (Postfix) with ESMTP id 2FDAD37BD7B for ; Tue, 30 May 2000 13:41:54 -0700 (PDT) (envelope-from archie@whistle.com) Received: (from archie@localhost) by bubba.whistle.com (8.9.3/8.9.2) id NAA34482; Tue, 30 May 2000 13:41:53 -0700 (PDT) Message-Id: <200005302041.NAA34482@bubba.whistle.com> Date: Tue, 30 May 2000 13:41:53 -0700 (PDT) From: Archie Cobbs Reply-To: archie@whistle.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/18909: select(2) timeout limited to 100000000 seconds Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 18909 >Category: kern >Synopsis: select(2) timeout limited to 100000000 seconds >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue May 30 13:50:00 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Archie Cobbs >Release: FreeBSD 3.4-RELEASE i386 >Organization: Whistle Communications, Inc. >Environment: 3.4-REL, 4.0-stable, 5.0-current >Description: select(2) returns EINVAL if the timeout is specified for longer than 100000000 seconds. Is this according to some specification? If so, nevermind, but please document this limitation in the man page. As it stands, there's nothing in the man page that indicates there is such an arbitrary limitation. Otherwise, it should support up to the maximum possible value that can be specified in a struct timeval. >How-To-Repeat: #include #include #include #include #include #include #include void main(int ac, char *av[]) { struct timeval tv; fd_set fds; int r; switch (ac) { default: errx(1, "usage: xx [secs]"); case 2: tv.tv_sec = strtol(av[1], 0, NULL); break; case 1: tv.tv_sec = 100000001; break; } tv.tv_usec = 0; FD_ZERO(&fds); FD_SET(0, &fds); r = select(1, &fds, NULL, NULL, &tv); if (r < 0) err(1, "select"); } >Fix: Either allow all valid struct timeval's, or else please document this shortcoming in the man page. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message