Re: [RFC PATCH 1/5] misc: Convert daemon () to GNU coding style

2023-04-18 Thread Sergey Bugaev
On Tue, Apr 18, 2023 at 9:49 PM Adhemerval Zanella Netto wrote: > > > > On 18/04/23 10:48, Cristian Rodríguez wrote: > > > > > > On Tue, Apr 18, 2023 at 8:02 AM Adhemerval Zanella Netto via Libc-alpha > > mailto:libc-al...@sourceware.org>> wrote: > > > > > > > > On 17/04/23 19:58, Sergey Buga

Re: [RFC PATCH 1/5] misc: Convert daemon () to GNU coding style

2023-04-18 Thread Adhemerval Zanella Netto
On 18/04/23 10:48, Cristian Rodríguez wrote: > > > On Tue, Apr 18, 2023 at 8:02 AM Adhemerval Zanella Netto via Libc-alpha > mailto:libc-al...@sourceware.org>> wrote: > > > > On 17/04/23 19:58, Sergey Bugaev via Libc-alpha wrote: > > This is nicer, and is going to be required for t

Re: [RFC PATCH 4/4] socket: Add a test for MSG_CMSG_CLOEXEC

2023-04-18 Thread Adhemerval Zanella Netto
On 18/04/23 12:37, Sergey Bugaev wrote: > Hello, > > On Tue, Apr 18, 2023 at 3:13 PM Adhemerval Zanella Netto wrote: >> On 17/04/23 10:39, Sergey Bugaev via Libc-alpha wrote: >>> Signed-off-by: Sergey Bugaev >> >> Add some description of what the test is accomplishing here. > > Do you mean in

Re: [RFC PATCH 4/4] socket: Add a test for MSG_CMSG_CLOEXEC

2023-04-18 Thread Sergey Bugaev
Hello, On Tue, Apr 18, 2023 at 3:13 PM Adhemerval Zanella Netto wrote: > On 17/04/23 10:39, Sergey Bugaev via Libc-alpha wrote: > > Signed-off-by: Sergey Bugaev > > Add some description of what the test is accomplishing here. Do you mean in the commit message? Done. Also changed: * in send_fd,

Re: [RFC PATCH 1/5] misc: Convert daemon () to GNU coding style

2023-04-18 Thread Cristian Rodríguez
On Tue, Apr 18, 2023 at 8:02 AM Adhemerval Zanella Netto via Libc-alpha < libc-al...@sourceware.org> wrote: > > > On 17/04/23 19:58, Sergey Bugaev via Libc-alpha wrote: > > This is nicer, and is going to be required for the following changes > > to reasonably stay within the 79 column limit. > > >

Re: [PATCH 2/5] hurd: Microoptimize sigreturn

2023-04-18 Thread Samuel Thibault
Sergey Bugaev, le mar. 18 avril 2023 13:21:50 +0300, a ecrit: > (Git managed to eat my email -- it both sent an empty one *and* > truncated my local file (what?); so retyping and resending this.) > > On Tue, Apr 18, 2023 at 2:23 AM Samuel Thibault > wrote: > > That doesn't seem to be true, we ge

Re: [RFC PATCH 4/4] socket: Add a test for MSG_CMSG_CLOEXEC

2023-04-18 Thread Adhemerval Zanella Netto
On 17/04/23 10:39, Sergey Bugaev via Libc-alpha wrote: > Signed-off-by: Sergey Bugaev Add some description of what the test is accomplishing here. Some small nits below, the patch LGTM. > --- > > This is an attempt to write a test, roughly based on > sysdeps/unix/sysv/linux/tst-scm_rights.c

Re: [RFC PATCH 2/5] Use O_CLOEXEC in more places

2023-04-18 Thread Adhemerval Zanella Netto
On 17/04/23 19:58, Sergey Bugaev via Libc-alpha wrote: > When opening a temporary file without O_CLOEXEC we risk leaking the > file descriptor if another thread calls (fork and then) exec while we > have the fd open. Fix this by consistently passing O_CLOEXEC everywhere > where we open a file fo

Re: [RFC PATCH 1/5] misc: Convert daemon () to GNU coding style

2023-04-18 Thread Adhemerval Zanella Netto
On 17/04/23 19:58, Sergey Bugaev via Libc-alpha wrote: > This is nicer, and is going to be required for the following changes > to reasonably stay within the 79 column limit. > > No functional change. > > Signed-off-by: Sergey Bugaev LGTM, some minor nits below. > --- > misc/daemon.c | 88

Re: [PATCH] utils/msgport.c: Add cmd_report_wait

2023-04-18 Thread Samuel Thibault
Applied, thansk! Sergey Bugaev, le mar. 18 avril 2023 13:49:15 +0300, a ecrit: > This exposes msg_report_wait. For example: > > $ msgport --report-wait --pid $$ > 26997: 2 threads > 26997: thread 0: proc_wait_request [init#3] > 26997: thread 1: msgport > --- > utils/Makefile | 2 +- > utils/ms

Re: [PATCH] procfs: Fix process creation time in /proc/pid/stat

2023-04-18 Thread Samuel Thibault
Applied, thanks! Sergey Bugaev, le mar. 18 avril 2023 13:49:02 +0300, a ecrit: > This was always showing up as 0, because apparently we need to query > creation_time for the task, not a thread. > > Here's a before vs after comparison: > > $ cat /proc/self/stat ~/procfs/self/stat > 11151 (cat) S

[PATCH] utils/msgport.c: Add cmd_report_wait

2023-04-18 Thread Sergey Bugaev
This exposes msg_report_wait. For example: $ msgport --report-wait --pid $$ 26997: 2 threads 26997: thread 0: proc_wait_request [init#3] 26997: thread 1: msgport --- utils/Makefile | 2 +- utils/msgport.c | 74 + 2 files changed, 75 insertions(+),

[PATCH] procfs: Fix process creation time in /proc/pid/stat

2023-04-18 Thread Sergey Bugaev
This was always showing up as 0, because apparently we need to query creation_time for the task, not a thread. Here's a before vs after comparison: $ cat /proc/self/stat ~/procfs/self/stat 11151 (cat) S 26571 11151 26571 0 0 0 0 0 0 0 1 0 0 0 20 0 2 0 0 154783744 251 0 134443008 134477480 0 0 0

Re: [PATCH 2/5] hurd: Microoptimize sigreturn

2023-04-18 Thread Sergey Bugaev
(Git managed to eat my email -- it both sent an empty one *and* truncated my local file (what?); so retyping and resending this.) On Tue, Apr 18, 2023 at 2:23 AM Samuel Thibault wrote: > That doesn't seem to be true, we get segfaults with this patch applied > in these tests: > > ./htl/tst-kill6.t

[no subject]

2023-04-18 Thread Sergey Bugaev