diff --git a/kernel/sys/syscall.c b/kernel/sys/syscall.c index e6428d01..c9fc5638 100644 --- a/kernel/sys/syscall.c +++ b/kernel/sys/syscall.c @@ -314,6 +314,7 @@ static int sys_execve(const char * filename, char *const argv[], char *const env static int sys_seek(int fd, int offset, int whence) { if (FD_CHECK(fd)) { + if ((FD_ENTRY(fd)->flags & FS_PIPE) || (FD_ENTRY(fd)->flags & FS_CHARDEVICE)) return -ESPIPE; switch (whence) { case 0: FD_OFFSET(fd) = offset;