Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Nov 1998 01:25:19 -0800 (PST)
From:      tah@d1.dion.ne.jp
To:        freebsd-gnats-submit@FreeBSD.ORG
Subject:   bin/8681: other macro name that has same number is used.
Message-ID:  <199811140925.BAA27737@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         8681
>Category:       bin
>Synopsis:       other macro name that has same number is used.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 14 01:30:01 PST 1998
>Last-Modified:
>Originator:     koyama takahiro
>Organization:
>Release:        2.2.6-RELEASE
>Environment:
maybe all version.
>Description:
at /usr/src/usr.bin/wall/ttymsg.c
macro O_NONBLOCK instead of F_SETFD is used as command for fcntl(2).

>How-To-Repeat:
nothing.

>Fix:
--- ttymsg.c.orig       Fri May 27 21:33:27 1994
+++ ttymsg.c    Sat Nov 14 16:03:14 1998
@@ -116,7 +116,7 @@
                        continue;
                }
                if (errno == EWOULDBLOCK) {
-                       int cpid, off = 0;
+                       int cpid;

                        if (forked) {
                                (void) close(fd);
@@ -139,7 +139,7 @@
                        (void) signal(SIGTERM, SIG_DFL); /* XXX */
                        (void) sigsetmask(0);
                        (void) alarm((u_int)tmout);
-                       (void) fcntl(fd, O_NONBLOCK, &off);
+                       (void) fcntl(fd, F_SETFL, 0);   /* clear O_NONBLOCK */
                        continue;
                }
                /*

>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811140925.BAA27737>