summaryrefslogtreecommitdiff
path: root/user/ulib.c
diff options
context:
space:
mode:
Diffstat (limited to 'user/ulib.c')
-rw-r--r--user/ulib.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/user/ulib.c b/user/ulib.c
index 4775939..c7b66c4 100644
--- a/user/ulib.c
+++ b/user/ulib.c
@@ -3,6 +3,17 @@
#include "kernel/fcntl.h"
#include "user/user.h"
+//
+// wrapper so that it's OK if main() does not call exit().
+//
+void
+_main()
+{
+ extern int main();
+ main();
+ exit(0);
+}
+
char*
strcpy(char *s, const char *t)
{