search for: sigchld_handler

Displaying 20 results from an estimated 33 matches for "sigchld_handler".

2002 Sep 03
2
[patch] for rsync
To Whom It May Concern: Below is a patch, that I have used to eliminate the unexplained errors in the rsync program. I was able to trace the problem to the order in which the sigchld_handler and wait_process routines were executed. If sigchld_handler executes first it retrieves the status that wait_process needs to indicate proper rsync termination. The code below allows the sigchld_handler to save the status of up to 10 child processes and make them available for use by wait_process...
2002 Dec 19
1
Status of sigchld_handler bug?
Will this patch ever be integrated into the main code? http://lists.samba.org/pipermail/rsync/2002-February/006371.html Jim Donovan Systems Engineer Sony Computer Entertainment America 650-655-5979 --------------------------------------------------------------------------------------- Steinbach's Guideline for Systems Programming Never test for an error condition you don't know how to
2004 Mar 29
2
Issue with rsync 2.6.1-pre1 on AIX
...I really need. (The above goes for rsync 2.6.1-pre1 built with Gcc 3.3.2 on AIX 5.2 [oslevel -r says 5200-02]). -------------- next part -------------- *** socket.c.orig Mon Mar 29 15:29:10 2004 --- socket.c Mon Mar 29 15:30:23 2004 *************** *** 431,440 **** static RETSIGTYPE sigchld_handler(UNUSED(int val)) { - signal(SIGCHLD, sigchld_handler); #ifdef WNOHANG while (waitpid(-1, NULL, WNOHANG) > 0) {} #endif } --- 431,440 ---- static RETSIGTYPE sigchld_handler(UNUSED(int val)) { #ifdef WNOHANG while (waitpid(-1, NULL, WNOHANG) > 0) {}...
2002 Apr 12
0
Problem with child process exit status.
...problem #3711 and includes the line rsync error: unexplained error (code 63) at main.c(537) The code # changes each time the test is run. Using HP C-ANSI-C B.11.11.02. configure line: CFLAGS="-O" ./configure --prefix=/opt/local In tracking this down, this is what I found: In main.c a sigchld_handler is setup that reaps any children processes ignoring any status from the child. There is also a wait_process function in main.c that is used to specifically wait for processes to terminate and return the status thereof. What is happening is the child terminates, the signal handler reaps the child...
2002 Sep 01
2
rsync error: unexplained error
...d termination, before the wait_process procedure is executed, the status of pid (as passed to wait_process) will not be available and the waitpid call in wait_process will fail with an ECHILD error. If however, wait_process executes first, it will successfully obtain the exit status of pid and the sigchld_handler can execute, to eliminate zombies, with no adverse affects. Since signal handlers execute asynchronously there is no way to predict when, if at all, a process will encounter this problem. I am providing below proposed new code that should resolve the problem. Certainly I can make these changes wi...
2001 Jul 26
7
Updated Cray patch against openssh SNAP-20010725
...attack.c - Modified to not depend on u_int16_t being 16bit in size. packet.c - Add new subroutine to return an explicit signed integer. scp.c - Modified to use alarm instead of setitimer. Unicos does not support setitier. serverloop.c - Modified sigchld_handler to only reset SIGCLD if HAVE_SIGACTION is not set. This is the only case its needs to be reset, the side effect is it fixes the problem with a infinite signal loop under unicos and unicosmk. Modified waitpid to keep trying if it gets an EINTR,...
2017 Jun 21
2
Dovecot 2.2.30* compiling error
...ned 1 exit status >> Please advise? > Time to upgrade ancient GCC? Well, I know it's old, but I didn't notice in changelog that something special new was added, so maybe this is somekind of bug? Edit, tested with newer gcc and got new error: db-checkpassword.c: In function 'sigchld_handler': db-checkpassword.c:434:6: error: assignment of read-only member '__in' db-checkpassword.c:437:26: error: assignment of read-only member '__in' db-checkpassword.c:439:13: error: assignment of read-only member '__in' db-checkpassword.c:440:26: error: assignment of read-o...
2001 Oct 31
2
suggested fix for the sigchld race
..._pipe[0] != -1) + FD_SET(notify_pipe[0], readset); +} +static void +notify_done(fd_set *readset) +{ + char c; + + if (notify_pipe[0] != -1 && FD_ISSET(notify_pipe[0], readset)) + while (read(notify_pipe[0], &c, 1) != -1) + debug2("notify_done: reading"); +} + static void sigchld_handler(int sig) { @@ -99,6 +138,7 @@ debug("Received SIGCHLD."); child_terminated = 1; signal(SIGCHLD, sigchld_handler); + notify_parent(); errno = save_errno; } @@ -242,6 +282,7 @@ if (fdin != -1 && buffer_len(&stdin_buffer) > 0) FD_SET(fdin, *writesetp); } +...
2002 Feb 28
2
lost status code
Rsync reports the status code of the remote command. So in some situations the status code is successful when the command fails. Rsync of a remote file to a local read-only directory fails, but exits with $status = 0. I'd like to get $status = 23. Is it possible? Local copy fails with status = 23 > mkdir /tmp/nowrite > chmod -w /tmp/nowrite > rsync /etc/group /tmp/nowrite || echo
2009 Mar 24
0
Issue with child process exits
...ntly started building a simulator using honeyd as an IP emulator and experienced an issue with hangs on exit from ssh and sftp sessions. A quick look at the OpenSSH source code revealed the following: In serverloop.c there is a signal handler defined for SIGCHLD as follows: static void sigchld_handler(int sig) { int save_errno = errno; debug("Received SIGCHLD."); child_terminated = 1; #ifndef _UNICOS mysignal(SIGCHLD, sigchld_handler); #endif notify_parent(); errno = save_errno; } As far as I can tell the primary purpose of this method is to set a value for child_termin...
2000 Oct 27
1
Typo in 2.2.0p1 ??
I don't already figure out what is the real impact of this but I think there is a typo in function sigchld_handler() in serverloop.c (l 75). It is written if (WIFEXITED(child_wait_status) || WIFSIGNALED(child_wait_status)) child_terminated = 1; child_has_selected = 0; But I think one actually means: if (WIFEXITED(child_wait_status) || WIFSIGNALED(child_wait_status)) { child_terminat...
2001 Aug 02
3
Cray patch against openssh-SNAP-20010802
...o sshd.c and openbsd/ssh-cray.c to disable cray process privileges. Depending on how a cray unicos/unicosmk system is configured user could su to root without a password with out this mod. Add no_sco flag to noop check for -lrpc which assumes that their was a -lyp library. Changed ifdef around sigchld_handler to ifdef out mysignal on crays. This works around a unicos sigacton bug. Defined INADDR_LOOPBACK in entropy.c The details on all the patches: configure.in - Add work around to sco libyp assumution. sshd.c - Turn off cray process privileges root is enough on PRIV_SU unicos/unicosm...
2012 Oct 01
1
BUG to compile dovecot 2.1.10 on Debian 4.0, using gcc 4.1.2
Hello, Today I needed to compile dovecot 2.1.10 on Debian 4.0, using gcc 4.1.2. When running 'make' getting the following error: -------------------------------------------------- -------- db-checkpassword.c: In function 'sigchld_handler': db-checkpassword.c: 426: error: assignment of read-only member '__in' db-checkpassword.c: 429: error: assignment of read-only member '__in' db-checkpassword.c: 431: error: assignment of read-only member '__in' db-checkpassword.c: 432: error: assignment of read-only mem...
2006 Feb 13
1
rsync SIGSEGV signal handler in Cygwin.
...c_panic_handler2); + signal(SIGBUS, rsync_panic_handler2); #endif /* def MAINTAINER_MODE */ starttime = time(NULL); diff -ur rsync-2.6.6/socket.c rsync/socket.c --- rsync-2.6.6/socket.c Thu Apr 14 20:08:12 2005 +++ rsync/socket.c Sat Jan 28 06:29:20 2006 @@ -431,7 +431,16 @@ static RETSIGTYPE sigchld_handler(UNUSED(int val)) { #ifdef WNOHANG - while (waitpid(-1, NULL, WNOHANG) > 0) {} + int status; + while (waitpid(-1, &status, WNOHANG) > 0) { + if (WIFSIGNALED(status)) + rprintf(FLOG, + "rsync error: (3) Child proccess has unexpectedly died with signal %d\n", + WTERMSIG(...
2003 Jun 27
5
PATCH/RFC: Another stab at the Cygwin hang problem
...! exit_cleanup(RERR_SOCKETIO); ! } return status; } *************** *** 867,878 **** exit_cleanup(RERR_SIGNAL); } - static RETSIGTYPE sigusr2_handler(int UNUSED(val)) { - extern int log_got_error; - if (log_got_error) _exit(RERR_PARTIAL); - _exit(0); - } - static RETSIGTYPE sigchld_handler(int UNUSED(val)) { #ifdef WNOHANG int cnt, status; --- 885,890 ---- *************** *** 964,970 **** orig_argv = argv; signal(SIGUSR1, sigusr1_handler); - signal(SIGUSR2, sigusr2_handler); signal(SIGCHLD, sigchld_handler); #ifdef MAINTAINER_MODE signal(SIGSEGV, rsync_panic_ha...
2001 Jul 22
2
Patches for Cray T3Es running Unicossmk and SV1s running Unicos
This patch is against Cray patch against openssh-SNAP-20010710. Here a few notes about them: 1) rijndael does not work on cray due to the fact it is rooted in 32 bits. I looking for a fix, it may come form Wendy Palam. For now the cray default to the following cihpers for ssh version 2 ssh are: 3des-cbc,blowfish-cbc,cast128-cbc,arcfour 2) Crays don't have setitimer so I
2017 Jun 21
0
Dovecot 2.2.30* compiling error
...e: application/octet-stream Size: 370 bytes Desc: not available URL: <http://dovecot.org/pipermail/dovecot/attachments/20170621/1265aa9b/attachment.obj> -------------- next part -------------- > Edit, tested with newer gcc and got new error: > > db-checkpassword.c: In function 'sigchld_handler': > db-checkpassword.c:434:6: error: assignment of read-only member '__in' > db-checkpassword.c:437:26: error: assignment of read-only member '__in' > db-checkpassword.c:439:13: error: assignment of read-only member '__in' > db-checkpassword.c:440:26: error:...
2002 Apr 05
1
[Bug 100] serverloop.c modifications for correct UNICOS behavior
http://bugzilla.mindrot.org/show_bug.cgi?id=100 ------- Additional Comments From mouring at eviladmin.org 2002-04-06 06:52 ------- The following code was committed to OpenSSH to catch some SysV issue. Does this keep UNICOS happy? while ((wait_pid = waitpid(-1, &wait_status, 0)) < 0) if (errno != EINTR) packet_disconnect("wait:
2002 May 12
1
"Unexplained error code xxx" in rsync-2.5.5
Hi. We sometimes/often get such errors. It occures in main.c/client_run(). I investigated further and found, that the waitpid() in main.c/wait_process() exits with -1, errno = ECHILD, which means "No children". *status can contain garbage in such cases - but not always. It happens under Solaris-2.5.1/SPARC. It (ECHILD) also happens on other Solaris versions - but there *status seems to
2017 Jun 21
2
Dovecot 2.2.30* compiling error
...c/redhat/BUILD/dovecot-2.2.30.2/src/lib/bits.h:41: more undefined references to `bits_required8' follow collect2: ld returned 1 exit status make[4]: *** [test-lib] Error 1 > > >> Edit, tested with newer gcc and got new error: >> >> db-checkpassword.c: In function 'sigchld_handler': >> db-checkpassword.c:434:6: error: assignment of read-only member '__in' >> db-checkpassword.c:437:26: error: assignment of read-only member '__in' >> db-checkpassword.c:439:13: error: assignment of read-only member '__in' >> db-checkpassword.c...