/* user defined header files */
#include "kvm/kvm-debug.h"
+#include "kvm/kvm-pause.h"
#include "kvm/kvm-help.h"
#include "kvm/kvm-cmd.h"
#include "kvm/kvm-run.h"
struct cmd_struct kvm_commands[] = {
+ { "pause", kvm_cmd_pause, NULL, 0 },
{ "debug", kvm_cmd_debug, NULL, 0 },
{ "help", kvm_cmd_help, NULL, 0 },
{ "run", kvm_cmd_run, kvm_run_help, 0 },
--- /dev/null
+#include <stdio.h>
+#include <string.h>
+#include <signal.h>
+
+#include <kvm/util.h>
+#include <kvm/kvm-cmd.h>
+#include <kvm/kvm-pause.h>
+
+int kvm_cmd_pause(int argc, const char **argv, const char *prefix)
+{
+ signal(SIGUSR2, SIG_IGN);
+ return system("kill -USR2 $(pidof kvm)");
+}