From owner-freebsd-arch@freebsd.org Tue Jun 27 13:29:24 2017 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01A34DAAA00 for ; Tue, 27 Jun 2017 13:29:24 +0000 (UTC) (envelope-from jwd@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B59566630D; Tue, 27 Jun 2017 13:29:23 +0000 (UTC) (envelope-from jwd@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 821) id 130C64F88; Tue, 27 Jun 2017 13:29:23 +0000 (UTC) Date: Tue, 27 Jun 2017 13:29:23 +0000 From: John To: Adrian Chadd Cc: Jeremie Le Hen , "freebsd-arch@freebsd.org" , Slawa Olhovchenkov Subject: Re: rtools were deemed almost unused 15 years ago... Message-ID: <20170627132923.GA95716@FreeBSD.org> References: <20170625130923.GD18123@zxy.spb.ru> <20170626124348.GA11618@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="k1lZvvs/B4yU6o8G" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 13:29:24 -0000 --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 wrote: > > ----- Jeremie Le Hen's Original Message ----- > >> On Sun, Jun 25, 2017 at 3:09 PM, Slawa Olhovchenkov 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--