- (djm) Avoid SIGCHLD breakage when run from rsync. Fix from
Sturle Sunde <sturle.sunde@usit.uio.no>
This commit is contained in:
parent
43a1c13e0f
commit
a370f4dcc6
|
@ -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
|
||||
|
@ -8254,4 +8258,4 @@
|
|||
- Wrote replacements for strlcpy and mkdtemp
|
||||
- Released 1.0pre1
|
||||
|
||||
$Id: ChangeLog,v 1.2059 2002/04/18 04:19:14 tim Exp $
|
||||
$Id: ChangeLog,v 1.2060 2002/04/18 12:53:22 djm Exp $
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
* XXX: we should tell the child how many bytes we need.
|
||||
*/
|
||||
|
||||
RCSID("$Id: entropy.c,v 1.41 2002/03/11 00:16:35 stevesk Exp $");
|
||||
RCSID("$Id: entropy.c,v 1.42 2002/04/18 12:53:27 djm Exp $");
|
||||
|
||||
#ifndef OPENSSL_PRNG_ONLY
|
||||
#define RANDOM_SEED_SIZE 48
|
||||
|
@ -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) &&
|
||||
|
|
Loading…
Reference in New Issue