]> andersk Git - openssh.git/commitdiff
- (djm) Avoid SIGCHLD breakage when run from rsync. Fix from
authordjm <djm>
Thu, 18 Apr 2002 12:53:22 +0000 (12:53 +0000)
committerdjm <djm>
Thu, 18 Apr 2002 12:53:22 +0000 (12:53 +0000)
   Sturle Sunde <sturle.sunde@usit.uio.no>

ChangeLog
entropy.c

index 63ec86d851ce0a44029b226213a797aeb1c27f92..018c6c3533b2af9e6f1fa6fa1b30c600bcf0c450 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+20020418
+ - (djm) Avoid SIGCHLD breakage when run from rsync. Fix from 
+   Sturle Sunde <sturle.sunde@usit.uio.no>
+
 20020417
  - (djm) Tell users to configure /dev/random support into OpenSSL in INSTALL
  - (djm) Fix .Nm in mdoc2man.pl from pspencer@fields.utoronto.ca
index d682450449bbbec29ec06d8e50991a348d5a02de..f31395947503aae21b2de1889bdff12b11bf3663 100644 (file)
--- a/entropy.c
+++ b/entropy.c
@@ -61,6 +61,7 @@ seed_rng(void)
        pid_t pid;
        int ret;
        unsigned char buf[RANDOM_SEED_SIZE];
+       mysig_t old_sigchld;
 
        if (RAND_status() == 1) {
                debug3("RNG is ready, skipping seeding");
@@ -74,6 +75,7 @@ seed_rng(void)
        if (pipe(p) == -1)
                fatal("pipe: %s", strerror(errno));
 
+       old_sigchld = mysignal(SIGCHLD, SIG_DFL);
        if ((pid = fork()) == -1)
                fatal("Couldn't fork: %s", strerror(errno));
        if (pid == 0) {
@@ -113,6 +115,7 @@ seed_rng(void)
        if (waitpid(pid, &ret, 0) == -1)
               fatal("Couldn't wait for ssh-rand-helper completion: %s", 
                   strerror(errno));
+       mysignal(SIGCHLD, old_sigchld);
 
        /* We don't mind if the child exits upon a SIGPIPE */
        if (!WIFEXITED(ret) && 
This page took 0.050619 seconds and 5 git commands to generate.