From nobody Thu Apr 17 19:24:25 2025 X-Original-To: dev-commits-src-main@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 4Zdns42w15z5sdr0 for ; Thu, 17 Apr 2025 19:24:40 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zdns33w5Yz3ZCt for ; Thu, 17 Apr 2025 19:24:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20230601.gappssmtp.com header.s=20230601 header.b=0AM0e8Da; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::533) smtp.mailfrom=wlosh@bsdimp.com Received: by mail-pg1-x533.google.com with SMTP id 41be03b00d2f7-b0b2d1f2845so843943a12.3 for ; Thu, 17 Apr 2025 12:24:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1744917877; x=1745522677; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=vy+F9iSMsqoNYWY1mUPxfX4f88LcTSujWdmFXLZhLSo=; b=0AM0e8DaKAgHgNwaiYA3Y7D5n4oIrSRyJdhWhHdoK9DZ9fXxTIzQD0yxwoiczDVweO Vi11r0cMGxcCocMudrri5Z6jRrmQ1TfBXO/EQeH2LofekZ5kUDqEjqbLGShW/lHC7xJA 3dwBomqTHMoisXhVnLozrKmMvh/AvRGMGPDN91eIulO9bXWZAMiLjNdZ1TIwF7uKBy6x p5M1wWXDgi0awXaE053VNL++OIxVmmROBNcVcXuhpw0MhRttueHUqS2lgDk8MJWm3MQT SVIC9BgQi4BrM+yFQ1qd9dw1t8eFaPuEh8ZENYKAoIqFK4sbPha9YizZkH0ly6+Cvow0 8Zjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744917877; x=1745522677; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vy+F9iSMsqoNYWY1mUPxfX4f88LcTSujWdmFXLZhLSo=; b=GTw4vafBc8PxzjFAuI1TUEHeniKucmYhu8BwsI7TMLTJKtkHI+42tf6tB7t2qmG2rz +AyUY21FmT1kJR8TFh8EwpD5JSJfsox1ZuN7niQodmld7Geplr2QrwBNBOabbcW3Ilg6 sbtG0XACJAyLipzvgGMCr7RMdODJ360XfBKAz9VepzuGMt/PUmpZND2ddhN3rbTG0eKv HTql5+FQdJDJIxWukqZTnSzLzAFwUW7YasuOpVWUocQkJi+oOE3IrckYe1aNlqrVW2El V9SfzNMpiQe2pQ1r1/9kSLUDz+NGgN8qXtcFwkli1v4pBhByYJMY57/7H2b7cXUr8DR8 uhdA== X-Forwarded-Encrypted: i=1; AJvYcCWTR81EjnU1KSeAZautLrnFIAce3pBHO/OecRdS9lw7EBwmVoxuNlgC6rn7gE9wTIzTw/xqXssT78tR5goKo3DpJFgvYQ==@freebsd.org X-Gm-Message-State: AOJu0YzTUqioItLQ4joK0VSfLrAIZFBqTzRmrn6WYKZGAxQETA04OQdu GsMCRZxCjetefVMLamNIl/s1s9YJlQ52BpVoopnQrhN+olRhgHvLu0mcL4XcScUvIzY9b/fPwsi lYrKz633JFGnfSQA8VSt0GkpEx9vRAZOXmEZVQw== X-Gm-Gg: ASbGnct+QBKcZD0DDdTlW9+fEoshqQ47sbxWdPw/F4Yyusobof/UlA/0K4zlexfd2kh OVyED67VSiZoNWvjHG+r5l4qLy9zt9M4LWcsSJjj87EmJr/b6+F3n4OX3jVwkYEa43F6pEnLB4T 03P7fuvzmygUe2/jcduB4oC+TgQlrFqiG42/oWrZDmLcI9HJYoQGrkRg== X-Google-Smtp-Source: AGHT+IFMWkq3ldPqW8x5Dgr0gzlFI6Xv586sxzXR85urbGHVMleaycJOYPIxxHyvbut1EfRDcTqJr6iRwRJJ6u+4pdw= X-Received: by 2002:a17:90b:548f:b0:2fe:8a84:e033 with SMTP id 98e67ed59e1d1-3087bb2a6f8mr308930a91.2.1744917877479; Thu, 17 Apr 2025 12:24:37 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202504171520.53HFK0o7057403@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Thu, 17 Apr 2025 13:24:25 -0600 X-Gm-Features: ATxdqUFT3jVBDAbPZvcrQRb1fahTUZpWLm5RlZ1k_PCJasyKw5rnI2nclhmz9Rg Message-ID: Subject: Re: git: 3b2f0bfc3516 - main - Add POSIX psiginfo(3) call To: Konstantin Belousov Cc: src-committers , "" , "" Content-Type: multipart/alternative; boundary="0000000000004002ed0632fe5a92" X-Spamd-Result: default: False [-2.61 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.61)[-0.614]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20230601.gappssmtp.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ARC_NA(0.00)[]; MISSING_XM_UA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::533:from]; R_SPF_NA(0.00)[no SPF record]; DMARC_NA(0.00)[bsdimp.com]; TO_DN_ALL(0.00)[]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; DKIM_TRACE(0.00)[bsdimp-com.20230601.gappssmtp.com:+] X-Rspamd-Queue-Id: 4Zdns33w5Yz3ZCt X-Spamd-Bar: -- --0000000000004002ed0632fe5a92 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Apr 17, 2025, 9:27=E2=80=AFAM Warner Losh wrote: > On Thu, Apr 17, 2025 at 9:20=E2=80=AFAM Konstantin Belousov > wrote: > > > > The branch main has been updated by kib: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D3b2f0bfc35167724a41c969c1823be6= b1ede15ab > > > > commit 3b2f0bfc35167724a41c969c1823be6b1ede15ab > > Author: Ricardo Branco > > AuthorDate: 2025-04-16 07:52:13 +0000 > > Commit: Konstantin Belousov > > CommitDate: 2025-04-17 15:19:44 +0000 > > > > Add POSIX psiginfo(3) call > > > > Signed-off-by: Ricardo Branco > > PR: 286133 > > MFC after: 1 week > > Github PR: https://github.com/freebsd/freebsd-src/pull/1666 > > We've been using 'Pull Request: ' for this trailer. > And the reason we do Pull-request: or Pull Request: is that both autoclose the pull request... We're working on moving to the git standard with dashes since it simplifies tool and can have better uniformity enforcement... Warner Warner > > > --- > > include/signal.h | 1 + > > lib/libc/gen/Makefile.inc | 3 ++- > > lib/libc/gen/Symbol.map | 1 + > > lib/libc/gen/psignal.3 | 22 +++++++++++++++++++++- > > lib/libc/gen/psignal.c | 6 ++++++ > > 5 files changed, 31 insertions(+), 2 deletions(-) > > > > diff --git a/include/signal.h b/include/signal.h > > index 388e164d7943..c1d341f317f4 100644 > > --- a/include/signal.h > > +++ b/include/signal.h > > @@ -115,6 +115,7 @@ int siginterrupt(int, int); > > #endif > > > > #if __POSIX_VISIBLE >=3D 200809 > > +void psiginfo(const siginfo_t *, const char *); > > void psignal(int, const char *); > > #endif > > > > diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc > > index 9b92e52cdfad..a8308a057b05 100644 > > --- a/lib/libc/gen/Makefile.inc > > +++ b/lib/libc/gen/Makefile.inc > > @@ -465,7 +465,8 @@ MLINKS+=3Dposix_spawn.3 posix_spawnp.3 \ > > posix_spawnattr_getsigdefault.3 posix_spawnattr_setsigdefault.3= \ > > posix_spawnattr_getsigmask.3 posix_spawnattr_setsigmask.3 \ > > posix_spawnattr_init.3 posix_spawnattr_destroy.3 > > -MLINKS+=3Dpsignal.3 strsignal.3 \ > > +MLINKS+=3Dpsignal.3 psiginfo.3 \ > > + psignal.3 strsignal.3 \ > > psignal.3 sys_siglist.3 \ > > psignal.3 sys_signame.3 > > MLINKS+=3Dpwcache.3 gid_from_group.3 \ > > diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map > > index ca3974e6b747..21b66acba213 100644 > > --- a/lib/libc/gen/Symbol.map > > +++ b/lib/libc/gen/Symbol.map > > @@ -458,6 +458,7 @@ FBSD_1.8 { > > aio_read2; > > aio_write2; > > execvpe; > > + psiginfo; > > rtld_get_var; > > rtld_set_var; > > }; > > diff --git a/lib/libc/gen/psignal.3 b/lib/libc/gen/psignal.3 > > index cd3cef0b44a9..605c3cf2d8fe 100644 > > --- a/lib/libc/gen/psignal.3 > > +++ b/lib/libc/gen/psignal.3 > > @@ -25,11 +25,12 @@ > > .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILIT= Y > OF > > .\" SUCH DAMAGE. > > .\" > > -.Dd May 30, 2016 > > +.Dd Apr 16, 2025 > > .Dt PSIGNAL 3 > > .Os > > .Sh NAME > > .Nm psignal , > > +.Nm psiginfo , > > .Nm strsignal , > > .Nm sys_siglist , > > .Nm sys_signame > > @@ -40,6 +41,8 @@ > > .In signal.h > > .Ft void > > .Fn psignal "int sig" "const char *s" > > +.Ft void > > +.Fn psiginfo "const siginfo_t *si" "const char *s" > > .Vt extern const char * const sys_siglist[] ; > > .Vt extern const char * const sys_signame[] ; > > .In string.h > > @@ -79,6 +82,16 @@ the string > > .Dq "Unknown signal" > > is produced. > > .Pp > > +The > > +.Fn psiginfo > > +function is similar to > > +.Fn psignal , > > +except that the signal number information is taken from the > > +.Fa si > > +argument which is a > > +.Vt siginfo_t > > +structure. > > +.Pp > > The message strings can be accessed directly > > through the external array > > .Va sys_siglist , > > @@ -104,3 +117,10 @@ The > > .Fn psignal > > function appeared in > > .Bx 4.2 . > > +The > > +.Fn psiginfo > > +function appeared in > > +.Fx 15.0 , > > +.Nx 6.0 , > > +and > > +.Dx 4.1 . > > diff --git a/lib/libc/gen/psignal.c b/lib/libc/gen/psignal.c > > index ab044f683d86..291a6a9337a0 100644 > > --- a/lib/libc/gen/psignal.c > > +++ b/lib/libc/gen/psignal.c > > @@ -55,3 +55,9 @@ psignal(int sig, const char *s) > > (void)_write(STDERR_FILENO, c, strlen(c)); > > (void)_write(STDERR_FILENO, "\n", 1); > > } > > + > > +void > > +psiginfo(const siginfo_t *si, const char *s) > > +{ > > + psignal(si->si_signo, s); > > +} > --0000000000004002ed0632fe5a92 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu, Apr 17, 2025, 9:27=E2=80= =AFAM Warner Losh <imp@bsdimp.com&= gt; wrote:
On Thu, Apr 17, 2025 at = 9:20=E2=80=AFAM Konstantin Belousov <kib@freebsd.org> wrote:
>
> The branch main has been updated by kib:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=3D3b2f0bfc35167724a41c969c1823be= 6b1ede15ab
>
> commit 3b2f0bfc35167724a41c969c1823be6b1ede15ab
> Author:=C2=A0 =C2=A0 =C2=A0Ricardo Branco <rbranco@suse.de>
> AuthorDate: 2025-04-16 07:52:13 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Konstantin Belousov <kib@FreeBSD.org>=
> CommitDate: 2025-04-17 15:19:44 +0000
>
>=C2=A0 =C2=A0 =C2=A0Add POSIX psiginfo(3) call
>
>=C2=A0 =C2=A0 =C2=A0Signed-off-by: Ricardo Branco <rbranco@suse.de&= gt;
>=C2=A0 =C2=A0 =C2=A0PR:=C2=A0 =C2=A0 =C2=A0286133
>=C2=A0 =C2=A0 =C2=A0MFC after:=C2=A0 =C2=A0 =C2=A0 =C2=A01 week
>=C2=A0 =C2=A0 =C2=A0Github PR:=C2=A0 =C2=A0 =C2=A0 =C2=A0https://github.com/freebsd/freebsd-src/pull/1666
We've been using 'Pull Request: ' for this trailer.

And the reas= on we do Pull-request: or Pull Request: is that both autoclose the pull req= uest... We're working on moving to the git standard with dashes since i= t simplifies tool and can have better uniformity enforcement...

Warner

<= /div>
Warner

> ---
>=C2=A0 include/signal.h=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 1 + >=C2=A0 lib/libc/gen/Makefile.inc |=C2=A0 3 ++-
>=C2=A0 lib/libc/gen/Symbol.map=C2=A0 =C2=A0|=C2=A0 1 +
>=C2=A0 lib/libc/gen/psignal.3=C2=A0 =C2=A0 | 22 +++++++++++++++++++++-<= br> >=C2=A0 lib/libc/gen/psignal.c=C2=A0 =C2=A0 |=C2=A0 6 ++++++
>=C2=A0 5 files changed, 31 insertions(+), 2 deletions(-)
>
> diff --git a/include/signal.h b/include/signal.h
> index 388e164d7943..c1d341f317f4 100644
> --- a/include/signal.h
> +++ b/include/signal.h
> @@ -115,6 +115,7 @@ int siginterrupt(int, int);
>=C2=A0 #endif
>
>=C2=A0 #if __POSIX_VISIBLE >=3D 200809
> +void=C2=A0 =C2=A0psiginfo(const siginfo_t *, const char *);
>=C2=A0 void=C2=A0 =C2=A0psignal(int, const char *);
>=C2=A0 #endif
>
> diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc
> index 9b92e52cdfad..a8308a057b05 100644
> --- a/lib/libc/gen/Makefile.inc
> +++ b/lib/libc/gen/Makefile.inc
> @@ -465,7 +465,8 @@ MLINKS+=3Dposix_spawn.3 posix_spawnp.3 \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0posix_spawnattr_getsigdefault.3 posix= _spawnattr_setsigdefault.3 \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0posix_spawnattr_getsigmask.3 posix_sp= awnattr_setsigmask.3 \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0posix_spawnattr_init.3 posix_spawnatt= r_destroy.3
> -MLINKS+=3Dpsignal.3 strsignal.3 \
> +MLINKS+=3Dpsignal.3 psiginfo.3 \
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0psignal.3 strsignal.3 \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0psignal.3 sys_siglist.3 \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0psignal.3 sys_signame.3
>=C2=A0 MLINKS+=3Dpwcache.3 gid_from_group.3 \
> diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map
> index ca3974e6b747..21b66acba213 100644
> --- a/lib/libc/gen/Symbol.map
> +++ b/lib/libc/gen/Symbol.map
> @@ -458,6 +458,7 @@ FBSD_1.8 {
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0aio_read2;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0aio_write2;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0execvpe;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0psiginfo;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rtld_get_var;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rtld_set_var;
>=C2=A0 };
> diff --git a/lib/libc/gen/psignal.3 b/lib/libc/gen/psignal.3
> index cd3cef0b44a9..605c3cf2d8fe 100644
> --- a/lib/libc/gen/psignal.3
> +++ b/lib/libc/gen/psignal.3
> @@ -25,11 +25,12 @@
>=C2=A0 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE= POSSIBILITY OF
>=C2=A0 .\" SUCH DAMAGE.
>=C2=A0 .\"
> -.Dd May 30, 2016
> +.Dd Apr 16, 2025
>=C2=A0 .Dt PSIGNAL 3
>=C2=A0 .Os
>=C2=A0 .Sh NAME
>=C2=A0 .Nm psignal ,
> +.Nm psiginfo ,
>=C2=A0 .Nm strsignal ,
>=C2=A0 .Nm sys_siglist ,
>=C2=A0 .Nm sys_signame
> @@ -40,6 +41,8 @@
>=C2=A0 .In signal.h
>=C2=A0 .Ft void
>=C2=A0 .Fn psignal "int sig" "const char *s"
> +.Ft void
> +.Fn psiginfo "const siginfo_t *si" "const char *s"= ;
>=C2=A0 .Vt extern const char * const sys_siglist[] ;
>=C2=A0 .Vt extern const char * const sys_signame[] ;
>=C2=A0 .In string.h
> @@ -79,6 +82,16 @@ the string
>=C2=A0 .Dq "Unknown signal"
>=C2=A0 is produced.
>=C2=A0 .Pp
> +The
> +.Fn psiginfo
> +function is similar to
> +.Fn psignal ,
> +except that the signal number information is taken from the
> +.Fa si
> +argument which is a
> +.Vt siginfo_t
> +structure.
> +.Pp
>=C2=A0 The message strings can be accessed directly
>=C2=A0 through the external array
>=C2=A0 .Va sys_siglist ,
> @@ -104,3 +117,10 @@ The
>=C2=A0 .Fn psignal
>=C2=A0 function appeared in
>=C2=A0 .Bx 4.2 .
> +The
> +.Fn psiginfo
> +function appeared in
> +.Fx 15.0 ,
> +.Nx 6.0 ,
> +and
> +.Dx 4.1 .
> diff --git a/lib/libc/gen/psignal.c b/lib/libc/gen/psignal.c
> index ab044f683d86..291a6a9337a0 100644
> --- a/lib/libc/gen/psignal.c
> +++ b/lib/libc/gen/psignal.c
> @@ -55,3 +55,9 @@ psignal(int sig, const char *s)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(void)_write(STDERR_FILENO, c, strlen= (c));
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(void)_write(STDERR_FILENO, "\n&= quot;, 1);
>=C2=A0 }
> +
> +void
> +psiginfo(const siginfo_t *si, const char *s)
> +{
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0psignal(si->si_signo, s);
> +}
--0000000000004002ed0632fe5a92--