mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 19:43:32 +00:00
f213556366
This is a recently introduced Linux Kernel feature that gives people like Debian package mantainers the power to arbitrarily redefine how executables are interpreted by the kernel. If your system gets tuned this way and you're not able to disable it, then you need to restore default behavior for the APE MZqFpD prefix as follows: sudo sh -c "echo ':APE:M::MZqFpD::/bin/sh:' >/proc/sys/fs/binfmt_misc/register" This prefix will cover all .com executables built with this tooling. Please don't run the above command unless you're certain you need it. See #2 for additional context.
29 lines
689 B
Bash
Executable file
29 lines
689 B
Bash
Executable file
#!/bin/sh
|
|
#-*-mode:sh;indent-tabs-mode:nil;tab-width:2;coding:utf-8-*-┐
|
|
#───vi: set net ft=sh ts=2 sts=2 fenc=utf-8 :vi─────────────┘
|
|
#
|
|
# SYNOPSIS
|
|
#
|
|
# Program Deprioritizer
|
|
#
|
|
# OVERVIEW
|
|
#
|
|
# This is a drop-in replacement for the traditional Unix `nice`
|
|
# command that also invokes `ionice`, which is important, since
|
|
# network and traffic is usually what clobber the system.
|
|
|
|
if [ -z "$IONICE" ]; then
|
|
if IONICE=$(command -v ionice 2>/dev/null); then
|
|
IONICE="$IONICE -c3"
|
|
fi
|
|
fi
|
|
|
|
if [ -z "$NICE" ]; then
|
|
NICE=$(command -v nice 2>/dev/null)
|
|
fi
|
|
|
|
if [ -z "$IONICE$NICE" ]; then
|
|
echo "error: can't be nice" >&2
|
|
fi
|
|
|
|
exec $IONICE $NICE "$@"
|