summaryrefslogtreecommitdiffstats
path: root/utils/statd/simu.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/statd/simu.c')
-rw-r--r--utils/statd/simu.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/utils/statd/simu.c b/utils/statd/simu.c
new file mode 100644
index 0000000..fa4e3a6
--- /dev/null
+++ b/utils/statd/simu.c
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 1995, 1997-1999 Jeffrey A. Uphoff
+ *
+ * NSM for Linux.
+ */
+
+#include "config.h"
+#include "statd.h"
+#include "notlist.h"
+
+extern void my_svc_exit (void);
+
+
+/*
+ * Services SM_SIMU_CRASH requests.
+ */
+void *
+sm_simu_crash_1_svc (void *argp, struct svc_req *rqstp)
+{
+ static char *result = NULL;
+
+ log (L_WARNING, "*** SIMULATING CRASH! ***");
+ my_svc_exit ();
+
+ if (rtnl)
+ nlist_kill (&rtnl);
+
+ return ((void *)&result);
+}