summaryrefslogtreecommitdiff
path: root/src/core/net-nonblock.c
diff options
context:
space:
mode:
authorJochen Eisinger <c0ffee@irssi.org>2006-08-01 20:31:38 +0000
committerc0ffee <c0ffee@dbcabf3a-b0e7-0310-adc4-f8d773084564>2006-08-01 20:31:38 +0000
commitbd3a137c814561bd1a110d1c020350b7de4d10fd (patch)
treecc91c171f3d3b5e251d4430c39adabd89b7d0703 /src/core/net-nonblock.c
parentda965109edfc988262d962bca2b9d6a6e80ecad5 (diff)
downloadirssi-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/core/net-nonblock.c')
-rw-r--r--src/core/net-nonblock.c2
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) {