From owner-freebsd-arch@FreeBSD.ORG Mon Apr 14 07:55:11 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B06DC106566B for ; Mon, 14 Apr 2008 07:55:11 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 771598FC18 for ; Mon, 14 Apr 2008 07:55:06 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id EF62A17104; Mon, 14 Apr 2008 07:55:04 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.2/8.14.2) with ESMTP id m3E7t4ie005288; Mon, 14 Apr 2008 07:55:04 GMT (envelope-from phk@critter.freebsd.dk) To: Ed Schouten From: "Poul-Henning Kamp" In-Reply-To: Your message of "Mon, 14 Apr 2008 09:47:10 +0200." <20080414074710.GI5934@hoeg.nl> Date: Mon, 14 Apr 2008 07:55:04 +0000 Message-ID: <5287.1208159704@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: arch@freebsd.org Subject: Re: f_offset X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2008 07:55:11 -0000 In message <20080414074710.GI5934@hoeg.nl>, Ed Schouten writes: >I'm experiencing similar problems with implementing read() and write() >inside my mpsafetty branch for TTY's. Just like the current TTY >implementation, my implementation will do strange things when two >threads call read() or write() at the same time. Data could end up mixed >together. The write side of this will break quite a lot of stuff, starting with syslogd(8), write(1), wall(1) and similar, all which expect to be able to spam terminals coherently. The read side will probably mostly cause trouble for programs that try to take input from /dev/tty, usually passwords. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.