changeset 1:4662c96a5794

vinit: add license
author David Demelier <markand@malikania.fr>
date Wed, 28 Jul 2021 16:42:58 +0200
parents 810d59028aae
children afa6317bd58f
files vinit.c
diffstat 1 files changed, 19 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/vinit.c	Wed Jul 28 14:28:31 2021 +0200
+++ b/vinit.c	Wed Jul 28 16:42:58 2021 +0200
@@ -1,3 +1,21 @@
+/*
+ * vinit.c -- vanilla linux init
+ *
+ * Copyright (c) 2021 David Demelier <markand@malikania.fr>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
 #include <sys/wait.h>
 #include <errno.h>
 #include <signal.h>
@@ -36,7 +54,7 @@
 		execv(args[0], args);
 		perror("execv");
 		exit(1);
-	case 1:
+	case -1:
 		perror("fork");
 	default:
 		break;