From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ken Brown Newsgroups: gmane.emacs.bugs Subject: bug#49524: 28.0.50; make-serial-process is not portable Date: Sun, 11 Jul 2021 11:24:58 -0400 Message-ID: <82e72be1-9907-c08f-0c1d-d625e914a902@cornell.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21234"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 To: 49524@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 11 17:31:14 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m2bQH-0005Lo-MY for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Jul 2021 17:31:14 +0200 Original-Received: from localhost ([::1]:35226 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2bQG-0004iw-Mk for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Jul 2021 11:31:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2bQ6-0004iL-Ch for bug-gnu-emacs@gnu.org; Sun, 11 Jul 2021 11:31:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52431) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m2bQ6-00079P-2j for bug-gnu-emacs@gnu.org; Sun, 11 Jul 2021 11:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m2bQ6-0004Wj-0w for bug-gnu-emacs@gnu.org; Sun, 11 Jul 2021 11:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ken Brown Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Jul 2021 15:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49524 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.162601741317344 (code B ref -1); Sun, 11 Jul 2021 15:31:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Jul 2021 15:30:13 +0000 Original-Received: from localhost ([127.0.0.1]:35744 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2bPI-0004Vg-Rg for submit@debbugs.gnu.org; Sun, 11 Jul 2021 11:30:13 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:50742) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2bPF-0004VR-58 for submit@debbugs.gnu.org; Sun, 11 Jul 2021 11:30:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39806) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2bPE-0004T8-NT for bug-gnu-emacs@gnu.org; Sun, 11 Jul 2021 11:30:08 -0400 Original-Received: from mail-bn8nam12on2070e.outbound.protection.outlook.com ([2a01:111:f400:fe5b::70e]:27393 helo=NAM12-BN8-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2bPC-0006Ny-FG for bug-gnu-emacs@gnu.org; Sun, 11 Jul 2021 11:30:08 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GTyP6UY/8znXBYZiPunALCR8i1KtWtE6gIzVsQOIOm54fvjlPgl0ejhjuSKOOYVqveIL7M4beKf1LscrJmxDyYizfr7Gnez/AwgMEW6BuBJrMcZarL4m3EfVOJliZ2y+eH74m5AqTqLV3TMen8x4yqryl42qUuvy7Y5bd4KddKHT7om48uX7LiijxTRX1MhNQtGGOB08Gr8MVDEXRrYYlKcQWdUsqpwf+uC2FWZHZqKrxzcHv2Wwxnosqif8RWWMuuXUD7N0oe4airX0+XD+1KfQRhdiCkJvvMDAwqaJoLtGgePG6U3DM1nXlbuS/OerZ9e4taO4pRt3x442Ew4/uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4qhEESL6fjCUcTBARTvx1ZTMIqQXN+VjNRlesv7VzW8=; b=IONvNHzk4Aj8IcvWdaujlwYeH+5HEwynb3dzUc5aRkNyfPuiVANaCLhHpoiNxD4/wwJCotlBb6TwqG5bkeNeTGt1necKDqBgoscE0J2NWc+bNM+e2yF+8SCI7GprXGIVhylu2XS1xu/d3RjJRTXb1yYitJ+KyJx9SkHeiQAgJ+ZGMKim3TPIpxktRje6EL4CGZL4fjM2ysvTnqV5wQ/Km89PagE52cIqKokFVCtP+b4PhMQfrJ4Hdql1yFT9LHvSKf7eaiU/dSgzN2M5xnpmbGzwAsY5Lo5scLtJH2sif7eLs7tXY0sqOVGONPWouXZpTG2APYgepdDdLdR1QPAK/g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cornell.edu; dmarc=pass action=none header.from=cornell.edu; dkim=pass header.d=cornell.edu; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cornell.edu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4qhEESL6fjCUcTBARTvx1ZTMIqQXN+VjNRlesv7VzW8=; b=je+aB7R2oqrFEvbqKEaXYkWwdH6ZiFY4T6L26vfSwdibwXvyFEJk9OIB6i1PZQD0J94xhUCToBmF6hQEBLGofOo4UjRYp4D4hY9ztYUJ9W7Y0ShZUtAkIKzkh1OCcQBgFkivaxV5T5Cg1I3+bM94jbLIZVx2lt/sMGZqXx5D1tk= Authentication-Results: gnu.org; dkim=none (message not signed) header.d=none;gnu.org; dmarc=none action=none header.from=cornell.edu; Original-Received: from BN7PR04MB4388.namprd04.prod.outlook.com (2603:10b6:406:f8::19) by BN3PR04MB2322.namprd04.prod.outlook.com (2a01:111:e400:7bb9::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.23; Sun, 11 Jul 2021 15:25:01 +0000 Original-Received: from BN7PR04MB4388.namprd04.prod.outlook.com ([fe80::cda2:359c:cb66:5c42]) by BN7PR04MB4388.namprd04.prod.outlook.com ([fe80::cda2:359c:cb66:5c42%7]) with mapi id 15.20.4308.021; Sun, 11 Jul 2021 15:25:00 +0000 Content-Language: en-US X-ClientProxiedBy: BL0PR02CA0084.namprd02.prod.outlook.com (2603:10b6:208:51::25) To BN7PR04MB4388.namprd04.prod.outlook.com (2603:10b6:406:f8::19) X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from [192.168.0.18] (24.194.34.31) by BL0PR02CA0084.namprd02.prod.outlook.com (2603:10b6:208:51::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.19 via Frontend Transport; Sun, 11 Jul 2021 15:25:00 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fd88d769-19c7-4e54-5c5a-08d944800c9a X-MS-TrafficTypeDiagnostic: BN3PR04MB2322: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RQ8aTLWHw0nCAMy70fmKwcm9ooBwrG9eb9mZa38o2GhKeLJD5HZLJ/6WX55VRJY6fiKH2R9KsNmfRa5S/8KqFse2x5s+GTHnam7ta0lpEdyPjStsYTnR6KhpvaOdRMbYI+jA/t4lTKygJM9NXCkM7+xi0vC3EgDbZjmD5buD9Oj+fJ9SOu8D5KOQ+lAYE3FfaJe2yjIFuJRish5c9TZJNeR3ANIt91Xl+y6XsL/GPg6MdL3cGNjNI25iwqaag+LdA0ANgB5EXfjDIleGML+jktvRTHwVYQFfEjA+JeD10sEuuJAkoGCtJTmAmaLyLcQVRVHf6nC8vI8G92DDPwNHn+2hLujIo/63Pj1DMC14fDRThwg4qHTdnaWjoeVYfY1tBmDum2Ttofb4HGReYD1uPKeC6RFuaMO2osG5JAc2IT3c/6xEk+8MixGX9OrbNPXc8guonJHKDX1iePq5UzwrKd+bj9gpnbEymrXs/lVNSX1VrJAGJ2HgeoIKpEwX+JS9TxjgXq5CiRArLJ5LUhTuWpMbztI9tmZ6PPmgiwb2c+Dcs74P7QJl8QNR5Wt4WUE8Ysmkq3tG4K1tZyGsMaR55cvwR8N73c3PTtimtHqmwEwpvrgwdCdSWRWgo/JOYa4FZF4K0lG9isSGMlMCvr+DoovQ7SF36ls7ZotJTRWAGrbjitgYa68vV861ArWeaHXqrY28UGl6c442FwWQ0b5M5BZpCeQJnP2UWpL1StpOR3j7VFB21QvdYr6vJr4jq k7fyXyUUU35Ef/ql+OJSzqoNimuchuH2tWuIHCwpysQbOhz2xcYO2hGg6UaAlmqARTF X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN7PR04MB4388.namprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(39860400002)(366004)(376002)(346002)(396003)(66556008)(2616005)(6916009)(16576012)(956004)(316002)(786003)(26005)(86362001)(8676002)(75432002)(66946007)(36756003)(38100700002)(66476007)(2906002)(478600001)(83380400001)(6486002)(31686004)(966005)(8936002)(31696002)(186003)(5660300002)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3isUW1t1fTlqBOD1gwwHnbUJNqhEwDcEAHGbDIZIodRvb7ejEZwkOU76qntFkMekuUPDN6yb2shNH6mGcoHPie2fNWMIHS0T418DdSd4sjaH77903fNsebHVGlQL2JSpE+j4kBnAeJtWtuk/RUbtWHFpTgh0m79CwYclO/BELB5obmyCr83Dda/TsPVDz4f3kEyCj49nHi4unsK+xCWWMlrSLxvmh2813Fp6+6KR2PHyR3uvgpMsHn0at8Z5S9fLZIDQePzzSkWEMtkmq4+iTkP4lDrwTwi8DfoF6n59snA5s1/5mwquBiA/0EVyFATlj4hwoK69YEDdtWo/SUm2AgJG+WFXuOPLkpwBhtMRo/1HkGY8KulJ73zCl4Ungv1sO1Bg8x/3M5ffKv62byDGtk/kllpV3zxBF3P4rm/W22M3Phu67x6DoDrA2y9qRl/KeVoom877hp2ty4VSvNPwLRUHniJbl2fuFkD01tjJzt6D9Vl9ZY+6KUYa7vu4LLe5Ktsl912LkTQdYuaOiZREQ+KdIriSZb8JRWTqrDn/eIh1lc8B36Ks0I6d24U4mbQ+Gwi1Lw/1CTHqf94O4YUcFI8s1DGd8JMC39auWLqRTiCw9GwnX7a4ZIHDhvUxqPFodEVcRWG2Rm9pdQgbfmxCA/j27GGrGtPsheAXLAg4nWZ4jsY9gCa7WDC2BJNwoULqtyo2VPfofvkDDjwPjBOgtaAIUMYzwjuFx0kWSq3lICIxOq96TdvW9HSC1i UKpixq/vnFyCB2+6sxQ+miBQansRpe1ivcxZNrM0Z8S8fsMb83R/gpJHtuL7/wQ2bKdTmTKbBNWSmKtIf12UuIktbzy93zjRhu X-OriginatorOrg: cornell.edu X-MS-Exchange-CrossTenant-Network-Message-Id: fd88d769-19c7-4e54-5c5a-08d944800c9a X-MS-Exchange-CrossTenant-AuthSource: BN7PR04MB4388.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jul 2021 15:25:00.8840 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5d7e4366-1b9b-45cf-8e79-b14b27df46e1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Z6M6kEjzQg2JC1XK6iSqfMI4+x8pSqlOCjImnl+CM9daBwR5VqobNdupUZcvyh0ZMmWe9DTRh6ZtwSgr5hjSOQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR04MB2322 Received-SPF: pass client-ip=2a01:111:f400:fe5b::70e; envelope-from=kbrown@cornell.edu; helo=NAM12-BN8-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:209804 Archived-At: Fmake_serial_process calls Fserial_process_configure, which calls serial_configure, which calls cfsetspeed with the speed argument equal to the numerical baud rate (e.g., 9600). But the documentation of cfsetspeed says that the speed argument must be one of the Bnnn constants defined in termios.h (e.g., B9600). See, for example, https://man7.org/linux/man-pages/man3/termios.3.html This incorrect call of cfsetspeed happens to succeed on GNU/Linux because glibc's cfsetspeed allows the argument to be the numerical baud rate, which it converts to the appropriate Bnnn constant. But I don't think emacs should be relying on this undocumented behavior. In particular, this doesn't work on Cygwin. And it wouldn't even work on GNU/Linux if emacs used the cfsetspeed replacement defined in sysdep.c instead of glibc's cfsetspeed. I think the way to fix this is to imitate the glibc code that converts the baud rate to a Bnnn constant, but maybe someone has a better idea. By the way, I came across this issue while investigating the failure of process-tests/fd-setsize-no-crash/make-serial-process on Cygwin.