Whamcloud - gitweb
Signals are hard.
authorshaver <shaver>
Sat, 26 Jul 2003 03:05:34 +0000 (03:05 +0000)
committershaver <shaver>
Sat, 26 Jul 2003 03:05:34 +0000 (03:05 +0000)
lustre/tests/multiop.c

index c656b0f..95d45f4 100755 (executable)
@@ -4,6 +4,7 @@
 #include <errno.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <signal.h>
 #include <stdlib.h>
 #include <unistd.h>
 
@@ -23,6 +24,8 @@ char usage[] =
 "        s  stat\n"
 "        S  fstat\n";
 
+void null_handler(int unused) { }
+
 int main(int argc, char **argv)
 {
         char *fname, *commands;
@@ -34,6 +37,8 @@ int main(int argc, char **argv)
                 exit(1);
         }
 
+        signal(SIGUSR1, null_handler);
+
         fname = argv[1];
         commands = argv[2];