2006-10-21 [paul] 2.5.6cvs4
[claws.git] / src / plugins / pgpcore / sgpgme.c
index 77295a684cd226ebcc17e652249a1c65c457779c..b09805086e8a37b4a0304c80a9ecae9dc531b5ee 100644 (file)
@@ -32,6 +32,9 @@
 #include <errno.h>
 #include <sys/types.h>
 #include <sys/wait.h>
+#if (defined(__DragonFly__) || defined (__NetBSD__) || defined (__FreeBSD__) || defined (__OpenBSD__))
+#  include <sys/signal.h>
+#endif
 #ifndef G_OS_WIN32
 #include <sys/mman.h>
 #endif
@@ -719,6 +722,7 @@ again:
                        } else if (pid == 0) {
                                /* son */
                                res = system(cmd);
+                               res = WEXITSTATUS(res);
                                _exit(res);
                        } else {
                                int status = 0;