Make changes needed for new demo

This commit is contained in:
Justine Tunney 2023-06-15 23:22:49 -07:00
parent c3440d040c
commit e6b7c16a53
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
13 changed files with 96 additions and 47 deletions

View file

@ -419,6 +419,7 @@ int unveil(const char *path, const char *permissions) {
// if the host environment enables unveil() to impose true security
// restrictions because the default behavior is to silently succeed
// so that programs will err on the side of working if distributed.
if (permissions) return einval();
if (IsOpenbsd()) return 0;
if (landlock_abi_version != -1) {
_unassert(landlock_abi_version >= 1);

View file

@ -19,7 +19,6 @@
#include "libc/calls/calls.h"
#include "libc/calls/struct/sched_param.h"
#include "libc/errno.h"
#include "libc/log/log.h"
#include "libc/sysv/consts/ioprio.h"
#include "libc/sysv/consts/prio.h"
#include "libc/sysv/consts/sched.h"
@ -30,7 +29,7 @@
* @return 0 on success, or -1 w/ errno
* @note error reporting currently not implemented
*/
int MakeProcessNice(void) {
int verynice(void) {
int e = errno;
setpriority(PRIO_PROCESS, 0, 10);
ioprio_set(IOPRIO_WHO_PROCESS, 0, IOPRIO_PRIO_VALUE(IOPRIO_CLASS_IDLE, 0));

View file

@ -104,7 +104,7 @@ char *GetInterpreterExecutableName(char *, size_t);
int _OpenExecutable(void);
bool _IsDynamicExecutable(const char *);
/* execution control */
int MakeProcessNice(void);
int verynice(void);
axdx_t setlongerjmp(jmp_buf)
libcesque returnstwice paramsnonnull();
void longerjmp(jmp_buf, intptr_t) libcesque wontreturn paramsnonnull();