From nobody Thu Dec 1 02:46:05 2022 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NN0nT56nSz4hrhc for ; Thu, 1 Dec 2022 02:46:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NN0nT3zDYz3khh for ; Thu, 1 Dec 2022 02:46:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669862765; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LzCnNk7VQvNyMmya6+nlqVKH/NBWkrYWIX9ktdped/s=; b=jVXSZOR0ooysHeydtfm3nqOuP/rNh9CBJG6fU+a2eakBUAHVGd3NmplOq0GNk4vazB1WqP p0wVtrCLA0YQg9Js3vuj5ED4aqEI48RgGhRi7dYBbcslny0R1X4L1AE3xq0i2/QnxYGcNl m/uQ0Y/CEnEBTNGAbC/yNzo9q5WWB1f2ASB1v3S7HusHVwV+EG9Wn+fa/yp0eUdhatr0UP yqR3DRC+yvGZhGcsRXMBani8OUasyfB4knZd8zSTYKECKFWoGahJZj98KqiaMpzfMsojPh rn04MELd2Vay1l8FvjfSSgwY7VCrKkPV55+UJr3CL+Jyxrn8Im8BEK2ieI9W5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1669862765; a=rsa-sha256; cv=none; b=E1Cxwscm7kQQbW/4Uy4jsYvoBY4sk4TQEX7fyC4IUnPdzejsPv+vLk43yGNuAOd3wkgazW hd68alEvCcsFXqwoXdrlK6qRq+9x1WXdVN32scekwUmoy3lTA2wUbM3wL9CKwzDmxFXqjY ayMi/eL2ioxkqPUoPIInljZ2982hU2tuKs6KEke+kt6BqeFbore8GDlRq94/wrX++G5SET Rjb6Ke/hGN4shehA7xcxl6NW4f++gA4HuHsSQd1wA31W4yuxhxXmefFOoa6X3lOz4yjBUl gzIj2A8vSlVkz+Wr62p4EQF1jXCqt+FXS2sPyg04Dr3a4mLvknbIv/XEphXxvw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NN0nT2wn6zLXp for ; Thu, 1 Dec 2022 02:46:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 2B12k5rg062682 for ; Thu, 1 Dec 2022 02:46:05 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 2B12k5jd062681 for bugs@FreeBSD.org; Thu, 1 Dec 2022 02:46:05 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 268093] [PATCH] killall(1) allow sending signals to pts(4) Date: Thu, 01 Dec 2022 02:46:05 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: kib@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268093 Konstantin Belousov changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kib@FreeBSD.org --- Comment #1 from Konstantin Belousov --- It is better to match on pts/, not just pts. For tty, the short match allows to specify e.g. ttyuX, i.e. USB-serial ports. Also, there is no need to have two identical snprintfs. Below is what I intent to commit after your confirmation. commit e442917ee41986c416afea1d152ad03c5daeeac4 Author: Daniel Dowse Date: Thu Dec 1 04:42:35 2022 +0200 killall(1): allow sending signals to processes with control terminal on pts(4) PR: 268093 Reviewed by: kib MFC after: 1 week diff --git a/usr.bin/killall/killall.c b/usr.bin/killall/killall.c index aca0830c158b..494a527d190b 100644 --- a/usr.bin/killall/killall.c +++ b/usr.bin/killall/killall.c @@ -255,7 +255,8 @@ main(int ac, char **av) if (tty) { if (strncmp(tty, "/dev/", 5) =3D=3D 0) snprintf(buf, sizeof(buf), "%s", tty); - else if (strncmp(tty, "tty", 3) =3D=3D 0) + else if (strncmp(tty, "tty", 3) =3D=3D 0 || + strncmp(tty, "pts/", 4) =3D=3D 0) snprintf(buf, sizeof(buf), "/dev/%s", tty); else snprintf(buf, sizeof(buf), "/dev/tty%s", tty); --=20 You are receiving this mail because: You are the assignee for the bug.=