supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Leah Neukirchen <leah@vuxu.org>
To: Zhixu Liu <zhixu.liu@gmail.com>
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, 04 Sep 2024 13:56:39 +0200	[thread overview]
Message-ID: <87ttev7hu0.fsf@vuxu.org> (raw)
In-Reply-To: <CALMA0xY=c645szSMUED3FUCS+a+GX2XNUdD7AyCWxSFq0m4HqA@mail.gmail.com> (Zhixu Liu's message of "Wed, 4 Sep 2024 19:35:23 +0800")

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/

  reply	other threads:[~2024-09-04 11:56 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 [this message]
2024-09-04 14:03   ` Zhixu Liu

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=87ttev7hu0.fsf@vuxu.org \
    --to=leah@vuxu.org \
    --cc=supervision@list.skarnet.org \
    --cc=zhixu.liu@gmail.com \
    /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).