Displaying 13 results from an estimated 13 matches for "main_sigchld_handler".
2003 Dec 22
1
possible sigchld bug
Hi
What if you have sysv signals (i.e. signal is restored when handler is
called) and child process exits here? Zombie will be left, because SIGCHLD
is ignored at that point. Shouldn't signal be before waitpid?
Mikulas
static void
main_sigchld_handler(int sig)
{
int save_errno = errno;
pid_t pid;
int status;
while ((pid = waitpid(-1, &status, WNOHANG)) > 0 ||
(pid < 0 && errno == EINTR))
;
<----- HERE
signal(SIGCHLD, main_sigchld_handler);
errno...
2002 Mar 29
1
Two patches for OpenSSH 3.1p1 (fwd)
...error(errno));
return 0.0;
+ }
}
RAND_add(&status, sizeof(&status), 0.0);
diff -r -c openssh-3.1p1/sshd.c openssh-3.1p1-peter/sshd.c
*** openssh-3.1p1/sshd.c Tue Mar 5 02:31:30 2002
--- openssh-3.1p1-peter/sshd.c Mon Mar 18 22:03:37 2002
***************
*** 264,273 ****
main_sigchld_handler(int sig)
{
int save_errno = errno;
! int status;
! while (waitpid(-1, &status, WNOHANG) > 0)
! ;
signal(SIGCHLD, main_sigchld_handler);
errno = save_errno;
--- 264,274 ----
main_sigchld_handler(int sig)
{
int save_errno = errno;
! int status, code;
!
! whil...
2020 Feb 07
2
Call for testing: OpenSSH 8.2
On Fri, 7 Feb 2020 at 15:09, Hisashi T Fujinaka <htodd at twofifty.com> wrote:
>
> On Fri, 7 Feb 2020, Damien Miller wrote:
>
> > On Thu, 6 Feb 2020, Hisashi T Fujinaka wrote:
> >
> >> Built and passed tests on NetBSD-9_RC2 on amd64 and on NetBSD-current on
> >> amd64. Issues with MacOS Catalina:
> >> configure: error: *** working libcrypto not
1999 Nov 20
1
openssh and DOS
...passed on to the openbsd people.
There is a related problem I noticed when doing this. If I open a
bunch of connections to ssh (say in a perl script) and then close
them all at once only some of the children get reaped on the server.
The reason for this seems to be that in the SIGCHLD handler,
main_sigchld_handler, uses a wait call to reap one child. If you
have multiple children dying at roughly the same time some do not
get caught by the handler and thus not reaped. They remain as
zombies until sshd is restarted (at which time the get reaped). To
circumvent this I have replaced the wait call with a loo...
2002 Mar 26
1
Two patches for OpenSSH 3.1p1
...error(errno));
return 0.0;
+ }
}
RAND_add(&status, sizeof(&status), 0.0);
diff -r -c openssh-3.1p1/sshd.c openssh-3.1p1-peter/sshd.c
*** openssh-3.1p1/sshd.c Tue Mar 5 02:31:30 2002
--- openssh-3.1p1-peter/sshd.c Mon Mar 18 22:03:37 2002
***************
*** 264,273 ****
main_sigchld_handler(int sig)
{
int save_errno = errno;
! int status;
! while (waitpid(-1, &status, WNOHANG) > 0)
! ;
signal(SIGCHLD, main_sigchld_handler);
errno = save_errno;
--- 264,274 ----
main_sigchld_handler(int sig)
{
int save_errno = errno;
! int status, code;
!
! whil...
2001 Jun 22
1
PATCH: pidfile/sigterm race
...& SSH_PROTO_1)
+ generate_ephemeral_server_key();
+
+ /* Arrange to restart on SIGHUP. The handler needs listen_sock. */
+ signal(SIGHUP, sighup_handler);
+
+ signal(SIGTERM, sigterm_handler);
+ signal(SIGQUIT, sigterm_handler);
+
+ /* Arrange SIGCHLD to be caught. */
+ signal(SIGCHLD, main_sigchld_handler);
+
+ /* Write out the pid file after the sigterm handler is setup */
if (!debug_flag) {
/*
* Record our pid in /var/run/sshd.pid to make it
@@ -871,17 +884,6 @@
fclose(f);
}
}
- if (options.protocol & SSH_PROTO_1)
- generate_ephemeral_server_key();
-
- /* Arrange t...
2000 Jul 09
0
OpenSSH 2.1.1p2: /etc/nologin handling and related stuff
...6,10 @@
signal(SIGHUP, sighup_handler);
signal(SIGTERM, sigterm_handler);
signal(SIGQUIT, sigterm_handler);
+#ifdef SIGDANGER
+ /* Don't die on AIX when the machine runs low on memory */
+ signal(SIGDANGER, SIG_IGN);
+#endif
/* Arrange SIGCHLD to be caught. */
signal(SIGCHLD, main_sigchld_handler);
2010 Jan 05
7
[Bug 1692] New: sshd sometimes dies when sent multiple SIGHUPs in quick succession
https://bugzilla.mindrot.org/show_bug.cgi?id=1692
Summary: sshd sometimes dies when sent multiple SIGHUPs in
quick succession
Product: Portable OpenSSH
Version: 5.3p1
Platform: Other
URL: https://bugs.launchpad.net/ubuntu/+source/openssh/+bug
/497781
OS/Version: Linux
Status: NEW
2013 Oct 07
4
Feature request: FQDN Host match
Hello!
I'm hoping that Gmail won't HTML format this mail so that I'll get flamed :)
Anyway, my question relates to ssh_config. The problem I find is that
the Host pattern is only applied to the argument given on the command
line, as outlined in the man page:
"The host is the hostname argument given on the command line (i.e. the
name is not converted to a canonicalized host name
2015 Jul 29
2
[PATCH] ssh: Add option to present certificates on command line
...-z certificate_file]\n"
+" [user@]hostname [command]\n"
);
exit(255);
}
@@ -215,6 +216,7 @@ usage(void)
static int ssh_session(void);
static int ssh_session2(void);
static void load_public_identity_files(void);
+static void load_certificate_files(void);
static void main_sigchld_handler(int);
/* from muxclient.c */
@@ -595,7 +597,7 @@ main(int ac, char **av)
again:
while ((opt = getopt(ac, av, "1246ab:c:e:fgi:kl:m:no:p:qstvx"
- "ACD:E:F:GI:KL:MNO:PQ:R:S:TVw:W:XYy")) != -1) {
+ "ACD:E:F:GI:KL:MNO:PQ:R:S:TVw:W:XYyz:")) != -1) {
switc...
2016 Dec 13
15
[Bug 2646] New: zombie processes when using privilege separation
https://bugzilla.mindrot.org/show_bug.cgi?id=2646
Bug ID: 2646
Summary: zombie processes when using privilege separation
Product: Portable OpenSSH
Version: 7.2p2
Hardware: ix86
OS: Linux
Status: NEW
Severity: minor
Priority: P5
Component: sshd
Assignee: unassigned-bugs at
2017 Oct 10
3
tunnel device name acquisition?
Numerous how-tos all over the Internet show how one would set up
a tunnel using ssh, e.g.:
ssh -f -o Tunnel=ethernet <server_ip> true
I was wondering if there's a way to subsequently acquire the names
of the local and remote tun/tap interfaces (e.g., using the default
"-w any:any") for subsequent automatic tunnel configuration, e.g.:
ip link set $TapDev up
ip link set
2018 Dec 10
2
[PATCH] cleanup of global variables server/client_version_string in sshconnect.c
In sshconnect.c there are two global variables for server_version_string
client_version_string.
These are used just in a few functions and can easily be passed as
parameters.
Also, there is a strange construct, where their memory is allocated to
the global pointers, then copies of these pointers are assigned to the
kex structure. The kex_free finally frees them via cleanup of the kex