diff options
author | Jochen Eisinger <c0ffee@irssi.org> | 2006-08-01 20:31:38 +0000 |
---|---|---|
committer | c0ffee <c0ffee@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2006-08-01 20:31:38 +0000 |
commit | bd3a137c814561bd1a110d1c020350b7de4d10fd (patch) | |
tree | cc91c171f3d3b5e251d4430c39adabd89b7d0703 /src | |
parent | da965109edfc988262d962bca2b9d6a6e80ecad5 (diff) | |
download | irssi-bd3a137c814561bd1a110d1c020350b7de4d10fd.zip |
reset the PRNG, because a some OSs clear the seed when forking
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4304 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r-- | src/core/net-nonblock.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/net-nonblock.c b/src/core/net-nonblock.c index 5eaae8d8..14e08664 100644 --- a/src/core/net-nonblock.c +++ b/src/core/net-nonblock.c @@ -101,6 +101,8 @@ int net_gethostbyname_nonblock(const char *addr, GIOChannel *pipe, #endif /* child */ + srand(time(NULL)); + memset(&rec, 0, sizeof(rec)); rec.error = net_gethostbyname(addr, &rec.ip4, &rec.ip6); if (rec.error == 0) { |