diff --git a/kernel/descriptor.cpp b/kernel/descriptor.cpp index 9d22da1b..c198b79e 100644 --- a/kernel/descriptor.cpp +++ b/kernel/descriptor.cpp @@ -52,7 +52,7 @@ const int ACCESS_FLAGS = O_READ | O_WRITE | O_EXEC | O_SEARCH; // Flags that only make sense at open time. const int OPEN_FLAGS = O_CREATE | O_DIRECTORY | O_EXCL | O_TRUNC | O_NOFOLLOW | - O_SYMLINK_NOFOLLOW; + O_SYMLINK_NOFOLLOW | O_NOCTTY; // Flags that only make sense for descriptors. const int DESCRIPTOR_FLAGS = O_APPEND | O_NONBLOCK; diff --git a/kernel/include/sortix/fcntl.h b/kernel/include/sortix/fcntl.h index 011d8244..270c63b0 100644 --- a/kernel/include/sortix/fcntl.h +++ b/kernel/include/sortix/fcntl.h @@ -1,6 +1,6 @@ /******************************************************************************* - Copyright(C) Jonas 'Sortie' Termansen 2012, 2013. + Copyright(C) Jonas 'Sortie' Termansen 2012, 2013, 2014. This file is part of Sortix. @@ -45,6 +45,7 @@ __BEGIN_DECLS #define O_NONBLOCK (1<<11) #define O_NOFOLLOW (1<<12) #define O_SYMLINK_NOFOLLOW (1<<13) +#define O_NOCTTY (1<<14) #define FD_CLOEXEC (1<<0) #define FD_CLOFORK (1<<1)