Re: [hackers] [st][PATCH] fix a problem that the standard streams are unexpectedly closed

From: Koichi Murase <myoga.murase_AT_gmail.com>
Date: Mon, 23 Aug 2021 10:36:52 +0900

Alex, Thank you for your advice!

2021年8月20日(金) 10:56 Alex Pilon <alp_AT_alexpilon.ca>:
> > Fix:
> >
> > I attach a patch file:
> >
> > - st-DontCloseStandardStreamsUnexpectedly-20210819-2ec571a.diff
>
> Normally people are expected to git send-email or compatible, just like
> on the Linux kernel ML, not attach patches.

Ah, OK. I had read the mention of "git send-email" on a suckless page,
but I somehow thought I needed to set up a sendmail server by myself
to use "git send-email". Now I searched it and found that I can just
specify the information of an existing SMTP server.

> Good commit messages are appreciated, though yours may be a tad
> verbose. It's a matter of taste, the maintainers', not mine.

I'm wondering what is the appropriate way to separate the email
message and the commit message, but can I include the email messages
in the cover letter of `git send-email'?

> The first example I can find in my INBOX is from Maarten van Gompel
> on the behalf of Stacy Harper (you have no on-behalf-of, so ignore
> the extra From:), subject [PATCH 24/24] Add missing keys on lazy
> numbers.

I noticed that some of the emails are missing in
lists.suckless.org/hackers. I couldn't find the above email in
lists.suckless.org but finally found it through Google search at
https://www.mail-archive.com/hackers_AT_suckless.org/msg10606.html. It
seems that a significant number of emails disappear in
lists.suckess.org. Is there any official complete archive of the
mailing list?

> > diff --git a/st.c b/st.c
> > index ebdf360..a9338e1 100644
> > --- a/st.c
> > +++ b/st.c
> > _AT_@ -793,14 +793,15 @@ ttynew(const char *line, char *cmd, const char *out, char **args)
> > …
> > if (ioctl(s, TIOCSCTTY, NULL) < 0)
> > die("ioctl TIOCSCTTY failed: %s\n", strerror(errno));
> > - close(s);
> > - close(m);
> > + if (s > 2)
> > + close(s);
>
> I'm pretty sure you want to indent close(s);.

Yeah, that is because Gmail removes whitespace, which was the reason I
also attached the patch file besides that in the mail body inline.
Now I resend the patch through `git send-email', so I believe the
whitespaces would be preserved.

I will resend the patch later using `git send-email'.

--
Koichi
Received on Mon Aug 23 2021 - 03:36:52 CEST

This archive was generated by hypermail 2.3.0 : Mon Aug 23 2021 - 14:48:31 CEST