From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73BD3C43381 for ; Mon, 4 Mar 2019 13:06:08 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 35A4C2075B for ; Mon, 4 Mar 2019 13:06:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aKp7st5Y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 35A4C2075B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.91) (envelope-from ) id 1h0nI9-0004b0-Em; Mon, 04 Mar 2019 08:06:01 -0500 Received: from mail-it1-x12a.google.com ([2607:f8b0:4864:20::12a]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1h0nI2-0004au-Qx for kernelnewbies@kernelnewbies.org; Mon, 04 Mar 2019 08:05:54 -0500 Received: by mail-it1-x12a.google.com with SMTP id m137so7097406ita.0 for ; Mon, 04 Mar 2019 05:05:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=pN517qE/pFqbPhdGm2I5A2IYxxqpDbT2PuepKDVYGv4=; b=aKp7st5YGpcud2gp9noRAoFrTNrtZUSZ3KtcCQ0P+9DwHw/fr4R33RpneiSRMb831K AHcNmJrxGQKkMjPfCmnQMWB2hcdmsnds+YSztUsfaCAelZLKVMbrjiD8XnmHLk2FXJW0 1rEYsiKylbfdpjVYcuKnF2y8prSMoL/KzEgmUfYTezDMZs17FdbNcA3cNWI4q/ez4iCH W//CLpF1RnK+LeeEDrHeqhmAcQjzhx5hQpmhOQ/wlRamUzvGbjPcudMYcGrFBDc/Xpfe TR6woBCNhLuSgXsgowWxPlgI046+DjDJe40zz2w+ofJTFoa5jm+4FX9yOu1bibcMnNXV b0xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=pN517qE/pFqbPhdGm2I5A2IYxxqpDbT2PuepKDVYGv4=; b=JI+Tmx13WH1n/PRTNi/pc1JKXTHfrmku468fcK0/6ySI5rMFjjZHuu+FljjloDCeKl VTfvjk16iC/+I3Vp589tWuYDLqarME7O4bCauBhOJcyDhgnWSH3HLVEQLU0hcqBZ9SI/ r9jVt2ea5x1quU98geFIWufrdERplqNSz5RyxrkxrPiyyUsprI/+X39StKsD24TFiI9e 7RD0uEYUIO+riyKIrwLGmiCySQAcwHHT7gR3ITCVRnepsNE1lZfF2wIysvpAb8DMfQt+ 4Cqi81hAP5IieVlhonNQcgf/qkif8sy7HkBaxmryfd6y4I4L4gu1jmp99o1lWBO5maQC QgdA== X-Gm-Message-State: APjAAAWfa3xyc5ZQUhX6LuR1AkO32LKxzY6qnXCcd3WRY6fVzfsaNs+M bnenqhA/vVPH9UcF+ZCRSmkfP68QCdn1zyCh260h/g== X-Google-Smtp-Source: AHgI3Ibo1r+I4hLiM79tnWfZUGBnOagIVowaLDFhl3ZCpNQIjBQV3kcv6dJgKfON5tVDK8rJPt/ybUQVd05FkgDUzBk= X-Received: by 2002:a24:3b0a:: with SMTP id c10mr8956880ita.10.1551704692468; Mon, 04 Mar 2019 05:04:52 -0800 (PST) MIME-Version: 1.0 References: <3824.1551552333@turing-police> <8247.1551592550@turing-police> <20190303110011.GA10485@kroah.com> In-Reply-To: <20190303110011.GA10485@kroah.com> From: Jeffrey Walton Date: Mon, 4 Mar 2019 08:04:23 -0500 Message-ID: Subject: Re: How to make /dev/ttyACM0 (and friends) exclusive? To: Greg KH Cc: kernelnewbies X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: noloader@gmail.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org On Sun, Mar 3, 2019 at 6:00 AM Greg KH wrote: > > On Sun, Mar 03, 2019 at 03:55:44AM -0500, Jeffrey Walton wrote: > > ... > > Again, go delete modem manager off of your system, it is the thing that > keeps opening the port up to see if you have made a valid connection on > the device or not. If you write your own program to talk to the device, > modem manager is not needed at all, and is known to cause this problem. Thanks Greg. I deleted modem manager, then ran two instances of my program. Both opened the device with O_EXCL, and both opens succeeded. They proceeded to much with one another's state. I don't think modem manager is the problem here. The first problem is the way this device is setup. An exclusive resource is being treated as a shared resource. The second problem is open silently ignores flags. Epic fail. Thanks again for the help. Jeff _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies