rtools were deemed almost unused 15 years ago...
Jeremie Le Hen
jlh at freebsd.org
Mon Jun 26 13:35:58 UTC 2017
On Mon, Jun 26, 2017 at 2:43 PM, John <jwd at freebsd.org> wrote:
> ----- Jeremie Le Hen's Original Message -----
>> On Sun, Jun 25, 2017 at 3:09 PM, Slawa Olhovchenkov <slw at zxy.spb.ru> wrote:
>> > 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...
I don't have any context here. If you think it's the right thing to
do, then go ahead and I will update the port tarball.
> Index: libexec/rshd/rshd.c
> ===================================================================
> --- 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 = 1;
> const char *cp, *errorstr;
> char sig, buf[BUFSIZ];
> @@ -496,8 +496,7 @@
> #ifdef USE_BLACKLIST
> blacklist(0, STDIN_FILENO, "success");
> #endif
> - for (fd = getdtablesize(); fd > 2; fd--)
> - (void) close(fd);
> + closefrom(3);
> if (setsid() == -1)
> syslog(LOG_ERR, "setsid() failed: %m");
> if (setlogin(pwd->pw_name) < 0)
>
> Cheers,
> John
>
>> --
>> Jeremie Le Hen
>> jlh at FreeBSD.org
>> _______________________________________________
>> freebsd-arch at freebsd.org mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-arch
>> To unsubscribe, send any mail to "freebsd-arch-unsubscribe at freebsd.org"
--
Jeremie Le Hen
jlh at FreeBSD.org
More information about the freebsd-arch
mailing list