diff options
Diffstat (limited to 'src/user/lib/unistd.c')
-rw-r--r-- | src/user/lib/unistd.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/user/lib/unistd.c b/src/user/lib/unistd.c index 01aa94f..cb862f8 100644 --- a/src/user/lib/unistd.c +++ b/src/user/lib/unistd.c @@ -161,3 +161,14 @@ size_t absolutepath(char *out, const char *in, size_t size) { void __setinitialcwd(const char *s) { __initialcwd = s; } + +static void intr_null(void) { } + +extern void (*volatile _intr)(void); +void intr_set(void (*fn)(void)) { + _intr = fn ? fn : intr_null; +} + +void intr_default(void) { + exit(-1); +} |