Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jun 2017 13:29:23 +0000
From:      John <jwd@freebsd.org>
To:        Adrian Chadd <adrian.chadd@gmail.com>
Cc:        Jeremie Le Hen <jlh@freebsd.org>, "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org>, Slawa Olhovchenkov <slw@zxy.spb.ru>
Subject:   Re: rtools were deemed almost unused 15 years ago...
Message-ID:  <20170627132923.GA95716@FreeBSD.org>
In-Reply-To: <CAJ-Vmon_mc-ECZwpGhbq3eFQrBLxqXcEOncKUuT2KNAdVp11bg@mail.gmail.com>
References:  <CAGSa5y3kVajpSSJUT9Vt0-dTwtaXMwNWvv_ELH14z68osM0UYA@mail.gmail.com> <CAGSa5y1=1zN0ywKQ--HTi%2BDY18M5o%2BGR0fv6CyaaF9WX-z9BZg@mail.gmail.com> <20170625130923.GD18123@zxy.spb.ru> <CAGSa5y1o300nthcsRd1pGzy04SjMrmRWtRrp4DP_NrpqF2rr=g@mail.gmail.com> <20170626124348.GA11618@FreeBSD.org> <CAJ-Vmon_mc-ECZwpGhbq3eFQrBLxqXcEOncKUuT2KNAdVp11bg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--k1lZvvs/B4yU6o8G
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

----- Adrian Chadd's Original Message -----
> Oh holy crap yes please. Do you have commit privs to src? If not,
> Reviewed by: adrian

Done - r320406

Prefer to maintain them right where they are...

-John

> -adrian
>=20
>=20
> On 26 June 2017 at 05:43, John <jwd@freebsd.org> wrote:
> > ----- Jeremie Le Hen's Original Message -----
> >> On Sun, Jun 25, 2017 at 3:09 PM, Slawa Olhovchenkov <slw@zxy.spb.ru> w=
rote:
> >> > On Sat, Jun 24, 2017 at 10:29:22PM +0200, Jeremie Le Hen wrote:
> >> >
> >> >> So the first step was to create a port with FreeBSD rcmds, here we
> >> >> are!  But I need some eyes to vet it:
> >> >> https://reviews.freebsd.org/D11345
> >> >
> >> > 1. Create port
> >> > 2. Port unmantained
> >> > 3. Port broken
> >> > 4. Port removed.
> >> > 5. Lack of functionality.
> >>
> >> Feel free to step in to help with the maintenance :-).
> >
> > Let's commit this little snippet which is a major win for HA heads
> > with 10 of thousands of file descriptors open...
> >
> > Index: libexec/rshd/rshd.c
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > --- libexec/rshd/rshd.c (revision 316672)
> > +++ libexec/rshd/rshd.c (working copy)
> > @@ -191,7 +191,7 @@
> >         struct passwd *pwd;
> >         u_short port;
> >         fd_set ready, readfrom;
> > -       int cc, fd, nfd, pv[2], pid, s;
> > +       int cc, nfd, pv[2], pid, s;
> >         int one =3D 1;
> >         const char *cp, *errorstr;
> >         char sig, buf[BUFSIZ];
> > @@ -496,8 +496,7 @@
> >  #ifdef USE_BLACKLIST
> >         blacklist(0, STDIN_FILENO, "success");
> >  #endif
> > -       for (fd =3D getdtablesize(); fd > 2; fd--)
> > -               (void) close(fd);
> > +       closefrom(3);
> >         if (setsid() =3D=3D -1)
> >                 syslog(LOG_ERR, "setsid() failed: %m");
> >         if (setlogin(pwd->pw_name) < 0)
> >
> > Cheers,
> > John
> >
> >> --
> >> Jeremie Le Hen
> >> jlh@FreeBSD.org
> >> _______________________________________________
> >> freebsd-arch@freebsd.org mailing list
> >> https://lists.freebsd.org/mailman/listinfo/freebsd-arch
> >> To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"

--k1lZvvs/B4yU6o8G
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQF8BAEBCgBmBQJZUl2xXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQwNDBGOTgxNzM0NzQ3OEFBNDYyODNGQzVC
NjI0OTlBMTQyNEY3RjgxAAoJELYkmaFCT3+B1fsH/RjnbWCbI1sfEIDdv2e/EdDV
GlhoX0+XDI9VQSj4Us+tcKDaTxnvHrOAdOtycTRjJJbMl+1r8Y0E0dZAuFpR1Eqe
8ZATRlWlZ7RvZKkBYeKGUlRNuNRZICo7R0A4/9CBVZCFoXC2oPjzq8sWOIBqVLho
gPDjPMDAHTPSboAA2GSlSZn9Uv9DZkqxMC5kjktx3EJon5RLPMGuCZxsM2NUP2Bc
RGagMaZlXoKb3qg2B1IQjoRnvY0RMxS3SFJR/0cDDppFcKGdLgZhlFOkPq6FOs7r
eJFdc6/oLdjbNm9xC7KOvHNT3FKbsg2qyI7woyP9RnBuovEiKXcvdi8pW42zzXc=
=1FFI
-----END PGP SIGNATURE-----

--k1lZvvs/B4yU6o8G--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170627132923.GA95716>