+#undef G_DISABLE_ASSERT
+#undef G_LOG_DOMAIN
+
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
static int n_iters = 10000;
static GMainLoop *loop;
-void
+static void
io_pipe (GIOChannel **channels)
{
int fds[2];
channels[1] = g_io_channel_unix_new (fds[1]);
}
-gboolean
+static gboolean
read_all (GIOChannel *channel, char *buf, int len)
{
- int bytes_read = 0;
- int count;
+ gsize bytes_read = 0;
+ gsize count;
GIOError err;
while (bytes_read < len)
return TRUE;
}
-gboolean
+static gboolean
write_all (GIOChannel *channel, char *buf, int len)
{
- int bytes_written = 0;
- int count;
+ gsize bytes_written = 0;
+ gsize count;
GIOError err;
while (bytes_written < len)
return TRUE;
}
-void
+static void
run_child (GIOChannel *in_channel, GIOChannel *out_channel)
{
int i;
exit (0);
}
-gboolean
+static gboolean
input_callback (GIOChannel *source,
GIOCondition condition,
gpointer data)
}
}
-void
-create_child ()
+static void
+create_child (void)
{
int pid;
GIOChannel *in_channels[2];