From owner-freebsd-bugs@FreeBSD.ORG Mon Jul 21 08:33:40 2008 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D09E3106564A for ; Mon, 21 Jul 2008 08:33:40 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.247]) by mx1.freebsd.org (Postfix) with ESMTP id 728798FC13 for ; Mon, 21 Jul 2008 08:33:40 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: by an-out-0708.google.com with SMTP id b33so422625ana.13 for ; Mon, 21 Jul 2008 01:33:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type:references :x-google-sender-auth; bh=P2/6RWjsaId0XwVyPcwj9GPk0qPQJAQ+sIqIT24BY+A=; b=aRj5wvBgQpZWg+1wOPbQyZmxlAX2+V+ARjps3ldXxPGHgQlp7KA11tE9/7JCDnNGkF aGTEBkIs66+MFD5n9mQRpGZwht661qcmMyCLSTIsyHGUrg1ZHqE0eiUkvCCErMJv2hUl ebJ/T70yMJUn4TjyhB1zMPdRrGQoN+qexMdKw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:references:x-google-sender-auth; b=whBN/i8CzOZ5b+xVFdW40RqSuYSdKH22CQrNJij/2QCM23PF38vAlyHB8m0IXK+dhR 3jSM8cWlXKTtPtRV4bRxxOQz7ncMu99/gqprYIKIRUXdsQqD6+Tt47aBhj6/Ghnu19s/ Kd3J1BqLIt81M/C11cvUu2Foy7ePJq/LjBNTk= Received: by 10.100.144.11 with SMTP id r11mr1608574and.140.1216629219721; Mon, 21 Jul 2008 01:33:39 -0700 (PDT) Received: by 10.100.111.13 with HTTP; Mon, 21 Jul 2008 01:33:39 -0700 (PDT) Message-ID: Date: Mon, 21 Jul 2008 10:33:39 +0200 From: "Antoine Brodin" Sender: antoine.brodin.freebsd@gmail.com To: "Garrett Cooper" In-Reply-To: <7d6fde3d0807210104t188b6ab5hc61dc67c49d27188@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_91012_9625174.1216629219724" References: <200807202210.m6KMA4cm032331@freefall.freebsd.org> <7d6fde3d0807201714g49eb4a80ncfcc1cc800ad595e@mail.gmail.com> <7d6fde3d0807210104t188b6ab5hc61dc67c49d27188@mail.gmail.com> X-Google-Sender-Auth: 8be07c0863657ac0 Cc: freebsd-bugs@freebsd.org Subject: Re: bin/125680: atacontrol(8): atacontrol depends on executable in /usr X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2008 08:33:40 -0000 ------=_Part_91012_9625174.1216629219724 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Mon, Jul 21, 2008 at 10:04 AM, Garrett Cooper wrote: > Antoine, > You're right. I flip-flopped parent and child there in my > original statement. > I also saw the async ('&') terminal command. > But what is ultimately gained by forking another process to read > a device other than just resuming control for the terminal to the > user? It seems like all this does is create potential for additional > zombie processes on the system... > Just as an experiment, could you insert another printf or some > statement to ensure that the read is deterministically completed every > time? I have attached a patch with an extra printf. I guess that the dd/read is done in the background because it can take hours, so the user doesn't have to wait hours to have his terminal back. Cheers, Antoine ------=_Part_91012_9625174.1216629219724 Content-Type: text/plain; name=atacontrol2-diff.txt Content-Transfer-Encoding: base64 X-Attachment-Id: f_fiwtfvsn0 Content-Disposition: attachment; filename=atacontrol2-diff.txt SW5kZXg6IHNiaW4vYXRhY29udHJvbC9hdGFjb250cm9sLmMKPT09P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mQ7CisKKwkJCXN3aXRjaCAoZm9yaygpKSB7CisJCQljYXNlIC0xOgorCQkJCWVy cigxLCAiZm9yayIpOworCQkJY2FzZSAwOgorCQkJCW5pY2UoMjApOworCQkJCXNucHJpbnRmKGRl dmljZSwgc2l6ZW9mKGRldmljZSksICIvZGV2L2FyJWQiLAorCQkJCQlhcnJheSk7CisJCQkJaWYg KChhcmZkID0gb3BlbihkZXZpY2UsIE9fUkRPTkxZKSkgPT0gLTEpCisJCQkJCWVycigxLCAib3Bl biAlcyIsIGRldmljZSk7CisJCQkJaWYgKChidWZmZXIgPSBtYWxsb2MoMTAyNCAqIDEwMjQpKSA9 PSBOVUxMKQorCQkJCQllcnIoMSwgIm1hbGxvYyIpOworCQkJCXdoaWxlIChyZWFkKGFyZmQsIGJ1 ZmZlciwgMTAyNCAqIDEwMjQpID4gMCkKKwkJCQkJOworCQkJCXByaW50ZigiYXRhY29udHJvbDog YXIlZCByZWJ1aWxkIGNvbXBsZXRlZFxuIiwKKwkJCQkJYXJyYXkpOworCQkJCWZyZWUoYnVmZmVy KTsKKwkJCQljbG9zZShhcmZkKTsKKwkJCQlicmVhazsKKwkJCWRlZmF1bHQ6CisJCQkJYnJlYWs7 CisJCQl9CiAJCX0KIAkJZXhpdChFWF9PSyk7CiAJfQo= ------=_Part_91012_9625174.1216629219724--