diff --git a/src/zma.cpp b/src/zma.cpp index 1dfd7716b..722582c97 100644 --- a/src/zma.cpp +++ b/src/zma.cpp @@ -36,6 +36,8 @@ void Usage() int main( int argc, char *argv[] ) { + srand( getpid() * time( 0 ) ); + int id = -1; static struct option long_options[] = { diff --git a/src/zmc.cpp b/src/zmc.cpp index 9839a032c..41250c1c1 100644 --- a/src/zmc.cpp +++ b/src/zmc.cpp @@ -42,6 +42,8 @@ void Usage() int main( int argc, char *argv[] ) { + srand( getpid() * time( 0 ) ); + const char *device = ""; const char *protocol = ""; const char *host = ""; diff --git a/src/zmf.cpp b/src/zmf.cpp index d5d58f132..7e890951e 100644 --- a/src/zmf.cpp +++ b/src/zmf.cpp @@ -104,6 +104,8 @@ void Usage() int main( int argc, char *argv[] ) { + srand( getpid() * time( 0 ) ); + int id = -1; static struct option long_options[] = { diff --git a/src/zms.cpp b/src/zms.cpp index a8aa3e29c..041eb59b3 100644 --- a/src/zms.cpp +++ b/src/zms.cpp @@ -52,6 +52,8 @@ bool ValidateAccess( User *user, int mon_id ) int main( int argc, const char *argv[] ) { + srand( getpid() * time( 0 ) ); + enum { ZMS_MONITOR, ZMS_EVENT } source = ZMS_MONITOR; enum { ZMS_JPEG, ZMS_MPEG, ZMS_RAW, ZMS_ZIP, ZMS_SINGLE } mode = ZMS_JPEG; char format[32] = ""; diff --git a/src/zmu.cpp b/src/zmu.cpp index 61a648955..c51c1c3ed 100644 --- a/src/zmu.cpp +++ b/src/zmu.cpp @@ -138,6 +138,8 @@ bool ValidateAccess( User *user, int mon_id, int function ) int main( int argc, char *argv[] ) { + srand( getpid() * time( 0 ) ); + static struct option long_options[] = { {"device", 2, 0, 'd'}, {"monitor", 1, 0, 'm'},