diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2003-08-25 01:16:21 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2003-08-25 01:16:21 +0000 |
commit | 5ade9abc37df3dacacbe20104877ca6dab61082a (patch) | |
tree | b3a521b87d93ecc0f1f17f4e659c1d4bf90f86f5 /entropy.c | |
parent | af4a6c3a5619299a16cfbb545cde110849596204 (diff) |
- (bal) redo how we handle 'mysignal()'. Move it to
openbsd-compat/bsd-misc.c, s/mysignal/signal/ and #define signal to
be our 'mysignal' by default. OK djm@
Diffstat (limited to 'entropy.c')
-rw-r--r-- | entropy.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -45,7 +45,7 @@ | |||
45 | * XXX: we should tell the child how many bytes we need. | 45 | * XXX: we should tell the child how many bytes we need. |
46 | */ | 46 | */ |
47 | 47 | ||
48 | RCSID("$Id: entropy.c,v 1.45 2003/05/16 05:51:45 djm Exp $"); | 48 | RCSID("$Id: entropy.c,v 1.46 2003/08/25 01:16:21 mouring Exp $"); |
49 | 49 | ||
50 | #ifndef OPENSSL_PRNG_ONLY | 50 | #ifndef OPENSSL_PRNG_ONLY |
51 | #define RANDOM_SEED_SIZE 48 | 51 | #define RANDOM_SEED_SIZE 48 |
@@ -75,7 +75,7 @@ seed_rng(void) | |||
75 | if (pipe(p) == -1) | 75 | if (pipe(p) == -1) |
76 | fatal("pipe: %s", strerror(errno)); | 76 | fatal("pipe: %s", strerror(errno)); |
77 | 77 | ||
78 | old_sigchld = mysignal(SIGCHLD, SIG_DFL); | 78 | old_sigchld = signal(SIGCHLD, SIG_DFL); |
79 | if ((pid = fork()) == -1) | 79 | if ((pid = fork()) == -1) |
80 | fatal("Couldn't fork: %s", strerror(errno)); | 80 | fatal("Couldn't fork: %s", strerror(errno)); |
81 | if (pid == 0) { | 81 | if (pid == 0) { |
@@ -116,7 +116,7 @@ seed_rng(void) | |||
116 | if (waitpid(pid, &ret, 0) == -1) | 116 | if (waitpid(pid, &ret, 0) == -1) |
117 | fatal("Couldn't wait for ssh-rand-helper completion: %s", | 117 | fatal("Couldn't wait for ssh-rand-helper completion: %s", |
118 | strerror(errno)); | 118 | strerror(errno)); |
119 | mysignal(SIGCHLD, old_sigchld); | 119 | signal(SIGCHLD, old_sigchld); |
120 | 120 | ||
121 | /* We don't mind if the child exits upon a SIGPIPE */ | 121 | /* We don't mind if the child exits upon a SIGPIPE */ |
122 | if (!WIFEXITED(ret) && | 122 | if (!WIFEXITED(ret) && |