1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
diff -Naur server/nxnode/src.orig/functions.pl server/nxnode/src/functions.pl
--- server/nxnode/src.orig/functions.pl 2007-04-18 23:59:08.000000000 +0200
+++ server/nxnode/src/functions.pl 2007-04-19 00:03:28.000000000 +0200
@@ -423,17 +423,14 @@
}
sub get_unique_id {
- my $now;
- $::TIMEVAL_T = "LL";
- $now = pack($::TIMEVAL_T, ());
+ my $now = gettimeofday;
- if (syscall(&SYS_gettimeofday, $now, 0) == -1) {
+ if ($now == -1) {
NXMsg::send_response("internal_server_error", "", ": cannot get time of day");
log_msg("cannot get time of day", $::LOG_ERR, 0);
handle_command ('exit');
}
- my @now2 = unpack($::TIMEVAL_T, $now);
my @command = ("ps","-e");
my @parameters = ();
my ($cmd_err, $cmd_out, $exit_value) = ::run_command (\@command, \@parameters);
diff -Naur server/nxnode/src.orig/nxshell.pl server/nxnode/src/nxshell.pl
--- server/nxnode/src.orig/nxshell.pl 2007-04-18 23:59:08.000000000 +0200
+++ server/nxnode/src/nxshell.pl 2007-04-19 00:03:50.000000000 +0200
@@ -36,4 +36,4 @@
use Socket;
#undef $ENV{'LANG'};
-require 'sys/syscall.ph';
+use Time::HiRes qw(gettimeofday);
|