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

Check error code of fork(2).

Index: conformance/interfaces/sigaction/17-14.c
--- conformance/interfaces/sigaction/17-14.c.orig
+++ conformance/interfaces/sigaction/17-14.c
@@ -38,7 +38,11 @@ int main()
 	pid_t pid;
 	struct timeval tv;
 
-	if ((pid = fork()) == 0) {
+	pid = fork();
+	if (pid == -1) {
+		perror("fork");
+		return PTS_UNRESOLVED;
+	} else if (pid == 0) {
 		/* child */
 		struct sigaction act;
 		
