_PROTOTYPE( ssize_t write, (int _fd, const void *_buf, size_t _n) );
_PROTOTYPE( int truncate, (const char *_path, off_t _length) );
_PROTOTYPE( int ftruncate, (int _fd, off_t _length) );
+_PROTOTYPE( int nice, (int _incr) );
/* Open Group Base Specifications Issue 6 (not complete) */
_PROTOTYPE( int symlink, (const char *path1, const char *path2) );
--- /dev/null
+/*
+nice.c
+*/
+
+#include <errno.h>
+#include <unistd.h>
+#include <sys/resource.h>
+
+int nice(incr)
+int incr;
+{
+ int r;
+
+ errno= 0;
+ r= getpriority(PRIO_PROCESS, 0);
+ if (r == -1 && errno != 0)
+ return r;
+ return setpriority(PRIO_PROCESS, 0, r+incr);
+}