mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-09 14:40:54 +00:00
Remove ref-counting since it didn't actually do any good.
Wed May 18 22:21:52 2005 Søren Sandmann <sandmann@redhat.com> * module/sysprof-module.c: Remove ref-counting since it didn't actually do any good. * sysprof.c (load_module): Use g_spawn_command_line_sync() instaed of system().
This commit is contained in:
committed by
Søren Sandmann Pedersen
parent
720e07109c
commit
d9de1e5a36
20
sysprof.c
20
sysprof.c
@ -27,6 +27,8 @@
|
||||
#include <glade/glade.h>
|
||||
#include <errno.h>
|
||||
#include <glib/gprintf.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "binfile.h"
|
||||
#include "watch.h"
|
||||
@ -471,13 +473,25 @@ sorry (GtkWidget *parent_window,
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
load_module (void)
|
||||
{
|
||||
int retval = system ("/sbin/modprobe sysprof-module");
|
||||
int exit_status = -1;
|
||||
char *dummy1, *dummy2;
|
||||
|
||||
return (retval == 0);
|
||||
if (g_spawn_command_line_sync ("/sbin/modprobe sysprof-module",
|
||||
&dummy1, &dummy2,
|
||||
&exit_status,
|
||||
NULL))
|
||||
{
|
||||
if (WIFEXITED (exit_status))
|
||||
exit_status = WEXITSTATUS (exit_status);
|
||||
|
||||
g_free (dummy1);
|
||||
g_free (dummy2);
|
||||
}
|
||||
|
||||
return (exit_status == 0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user