supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Zhixu Liu <zhixu.liu@gmail.com>
To: Leah Neukirchen <leah@vuxu.org>
Cc: supervision@list.skarnet.org
Subject: Re: runit: tryshsgr.c: why not test whether gid_t is short by using "sizeof(short) == sizeof(gid_t)"
Date: Wed, 4 Sep 2024 22:03:57 +0800	[thread overview]
Message-ID: <CALMA0xbAqsroeYtmRaVcncuW-H2n3W4TdzzV0FsgS=ytwBdYXA@mail.gmail.com> (raw)
In-Reply-To: <87ttev7hu0.fsf@vuxu.org>

Get and confirm it, thanks for the reply.

On Wed, Sep 4, 2024 at 7:56 PM Leah Neukirchen <leah@vuxu.org> wrote:
>
> Zhixu Liu <zhixu.liu@gmail.com> writes:
>
> > Hi,
> >
> > I'm trying to keep runit remaining available in gentoo's official portage tree,
> > see https://bugs.gentoo.org/938282 . I setup a github repo at
> > https://github.com/clan/runit/ for this purpose, following is what I'm doing
> > now:
> > 1. fix all the compilation error(s)
> > 2. eliminate the compilation warning(s) as much as possible
> >
> > Now I 'm in stage 2, when fixing the warning of
> > -Wincompatible-pointer-types, see
> > https://github.com/clan/runit/blob/master/admin/runit-2.1.2/src/tryshsgr.c
> >
> > As G. Pape has commented at
> > https://github.com/clan/runit/commit/5a7b8099ae638ce72abae2c4d8cac7ce33477522
> >
> >> "tryshsgr" is specifically there to check whether the size of gid_t is short,
> >> it doesn't matter if it fails at compile time or run time. But with this
> >> change, it always succeeds, and so always size short is
> >> assumed, even though most systems should have unsigned int I guess.
>
> As of runit.git 84457fd2 (2005-08-23), prot_gid is unused and all of
> this is dead code that can be removed.  setgroups is used directly
> with proper gid_t types.
>
> --
> Leah Neukirchen  <leah@vuxu.org>  https://leahneukirchen.org/



-- 
Z. Liu

      reply	other threads:[~2024-09-04 14:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-04 11:35 Zhixu Liu
2024-09-04 11:56 ` Leah Neukirchen
2024-09-04 14:03   ` Zhixu Liu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALMA0xbAqsroeYtmRaVcncuW-H2n3W4TdzzV0FsgS=ytwBdYXA@mail.gmail.com' \
    --to=zhixu.liu@gmail.com \
    --cc=leah@vuxu.org \
    --cc=supervision@list.skarnet.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).