$OpenBSD: patch-conformance_interfaces_sigsuspend_3-1_c,v 1.1 2018/05/08 22:13:36 bluhm Exp $

Check error code of fork(2).

Index: conformance/interfaces/sigsuspend/3-1.c
--- conformance/interfaces/sigsuspend/3-1.c.orig
+++ conformance/interfaces/sigsuspend/3-1.c
@@ -32,9 +32,12 @@
 int main()
 {
 	pid_t pid;
-	pid = fork();
 
-	if (pid == 0) {
+	pid = fork();
+	if (pid == -1) {
+		perror("fork");
+		return PTS_UNRESOLVED;
+	} else if (pid == 0) {
 		/* child */
 
 	        sigset_t tempmask;
