There's some problem with uname () - some systems like Solaris or Digital
1999-05-07 Martin Baulig <martin@home-of-linux.org> * server.c (main): There's some problem with uname () - some systems like Solaris or Digital Unix return a nonnegative value on success, some others like Linux return 0. Since all known systems seem to return a negative value on failure, we simply check whether the return value is not negative here.
This commit is contained in:
committed by
Martin Baulig
parent
217a1e92c6
commit
74d11991ab
@@ -1,6 +1,7 @@
|
|||||||
Makefile.in
|
Makefile.in
|
||||||
Makefile
|
Makefile
|
||||||
libgtop_daemon
|
libgtop_daemon
|
||||||
|
libgtop_server
|
||||||
server.conf
|
server.conf
|
||||||
.libs
|
.libs
|
||||||
.deps
|
.deps
|
||||||
|
@@ -1,3 +1,11 @@
|
|||||||
|
1999-05-07 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* server.c (main): There's some problem with uname () - some systems
|
||||||
|
like Solaris or Digital Unix return a nonnegative value on success,
|
||||||
|
some others like Linux return 0. Since all known systems seem to return
|
||||||
|
a negative value on failure, we simply check whether the return value is
|
||||||
|
not negative here.
|
||||||
|
|
||||||
1999-02-19 Martin Baulig <martin@home-of-linux.org>
|
1999-02-19 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
* Makefile.am (LIBGTOP_COMPILE_SYSTEM): Hardcoded system name.
|
* Makefile.am (LIBGTOP_COMPILE_SYSTEM): Hardcoded system name.
|
||||||
|
@@ -68,7 +68,7 @@ main(int argc, char *argv[])
|
|||||||
uid = getuid (); euid = geteuid ();
|
uid = getuid (); euid = geteuid ();
|
||||||
gid = getgid (); egid = getegid ();
|
gid = getgid (); egid = getegid ();
|
||||||
|
|
||||||
if (uname (&uts)) _exit (1);
|
if (uname (&uts) < 0) _exit (1);
|
||||||
|
|
||||||
if (strcmp (uts.sysname, LIBGTOP_COMPILE_SYSTEM) ||
|
if (strcmp (uts.sysname, LIBGTOP_COMPILE_SYSTEM) ||
|
||||||
strcmp (uts.release, LIBGTOP_COMPILE_RELEASE) ||
|
strcmp (uts.release, LIBGTOP_COMPILE_RELEASE) ||
|
||||||
|
Reference in New Issue
Block a user