summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Danner <danner.simon@gmail.com>2022-04-03 19:36:27 +0200
committerAndreas Kling <kling@serenityos.org>2022-05-21 18:10:52 +0200
commitb9a8447dc08ffac071f91b3bc64df0cb3ff40f0a (patch)
treeca83e05e4614fdc88672b420c664e1c319950b8f
parent651560d588d5e07fce17e5e77284403b0655fc2b (diff)
downloadserenity-b9a8447dc08ffac071f91b3bc64df0cb3ff40f0a.zip
LibC: Add a stub for nice()
-rw-r--r--Userland/Libraries/LibC/unistd.cpp7
-rw-r--r--Userland/Libraries/LibC/unistd.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/Userland/Libraries/LibC/unistd.cpp b/Userland/Libraries/LibC/unistd.cpp
index cd88b63a90..77420a3e61 100644
--- a/Userland/Libraries/LibC/unistd.cpp
+++ b/Userland/Libraries/LibC/unistd.cpp
@@ -995,4 +995,11 @@ int getdtablesize()
int rc = getrlimit(RLIMIT_NOFILE, &dtablesize);
__RETURN_WITH_ERRNO(rc, dtablesize.rlim_cur, rc);
}
+
+// https://pubs.opengroup.org/onlinepubs/007904975/functions/nice.html
+int nice(int incr)
+{
+ dbgln("FIXME: nice was called with: {}, not implemented", incr);
+ return incr;
+}
}
diff --git a/Userland/Libraries/LibC/unistd.h b/Userland/Libraries/LibC/unistd.h
index a5082dcd03..1d1e1b99da 100644
--- a/Userland/Libraries/LibC/unistd.h
+++ b/Userland/Libraries/LibC/unistd.h
@@ -120,6 +120,7 @@ char* getpass(char const* prompt);
int pause(void);
int chroot(char const*);
int getdtablesize(void);
+int nice(int incr);
enum {
_PC_NAME_MAX,