summaryrefslogtreecommitdiff
path: root/src/daemon/gnuserv.c
diff options
context:
space:
mode:
authorMartin Baulig <martin@home-of-linux.org>1998-08-25 08:20:04 +0000
committerMartin Baulig <martin@src.gnome.org>1998-08-25 08:20:04 +0000
commitf66f7fde8c07c98594f4aec55dde0fc81b83192f (patch)
treede8d87a7c2c3fd84b1bf320bd741f5f978e0afad /src/daemon/gnuserv.c
parent9049a19434f293e650402c724f460d2473e66bcb (diff)
downloadlibgtop-f66f7fde8c07c98594f4aec55dde0fc81b83192f.tar.gz
Added prototype. Added cast to `const void *' in calls to `write' and
1998-08-25 Martin Baulig <martin@home-of-linux.org> * daemon.h (handle_parent_connection): Added prototype. * write.c, io.c: Added cast to `const void *' in calls to `write' and `send' to avoid compiler warnings. * gnuserv.c (handle_signal): Declared static. (main): Casting return value of `getuid' to `int' in debugging statement. * ChangeLog: New file.
Diffstat (limited to 'src/daemon/gnuserv.c')
-rw-r--r--src/daemon/gnuserv.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/daemon/gnuserv.c b/src/daemon/gnuserv.c
index dd74c645..82fd646c 100644
--- a/src/daemon/gnuserv.c
+++ b/src/daemon/gnuserv.c
@@ -43,6 +43,7 @@
#include <fcntl.h>
#include <sys/wait.h>
+#include <sys/socket.h>
#ifdef AIX
#include <sys/select.h>
@@ -480,7 +481,7 @@ handle_unix_request (int ls)
#endif /* UNIX_DOMAIN_SOCKETS */
-void
+static void
handle_signal (int sig)
{
fprintf (stderr, "Catched signal %d.\n", sig);
@@ -521,8 +522,11 @@ main (int argc, char *argv [])
/* Temporarily drop our priviledges. */
+#ifdef DEBUG
fprintf (stderr, "Child ID: (%d, %d) - (%d, %d)\n",
- getuid (), geteuid (), getgid (), getegid ());
+ (int) getuid (), (int) geteuid (),
+ (int) getgid (), (int) getegid ());
+#endif
if (setreuid (geteuid (), getuid ()))
glibtop_error_io ("setreuid (euid <-> uid)");
@@ -530,8 +534,11 @@ main (int argc, char *argv [])
if (setregid (getegid (), getgid ()))
glibtop_error_io ("setregid (egid <-> gid)");
+#ifdef DEBUG
fprintf (stderr, "Child ID: (%d, %d) - (%d, %d)\n",
- getuid (), geteuid (), getgid (), getegid ());
+ (int) getuid (), (int) geteuid (),
+ (int) getgid (), (int) getegid ());
+#endif
#ifdef UNIX_DOMAIN_SOCKETS
/* get a unix domain socket to listen on. */