removed /etc and /opt

This commit is contained in:
cutemeli
2025-12-22 10:48:14 +00:00
parent 5ce7ca2c5d
commit 10d1afbb17
32559 changed files with 0 additions and 6756692 deletions

View File

@@ -1,34 +0,0 @@
"""When called as a script, print a comma-separated list of the open
file descriptors on stdout.
Usage:
fd_stats.py: check all file descriptors
fd_status.py fd1 fd2 ...: check only specified file descriptors
"""
import errno
import os
import stat
import sys
if __name__ == "__main__":
fds = []
if len(sys.argv) == 1:
try:
_MAXFD = os.sysconf("SC_OPEN_MAX")
except:
_MAXFD = 256
test_fds = range(0, _MAXFD)
else:
test_fds = map(int, sys.argv[1:])
for fd in test_fds:
try:
st = os.fstat(fd)
except OSError as e:
if e.errno == errno.EBADF:
continue
raise
# Ignore Solaris door files
if not stat.S_ISDOOR(st.st_mode):
fds.append(fd)
print(','.join(map(str, fds)))

View File

@@ -1,7 +0,0 @@
"""When called as a script, consumes the input"""
import sys
if __name__ == "__main__":
for line in sys.stdin:
pass

View File

@@ -1,7 +0,0 @@
"""When ran as a script, simulates cat with no arguments."""
import sys
if __name__ == "__main__":
for line in sys.stdin:
sys.stdout.write(line)

View File

@@ -1,10 +0,0 @@
"""When called with a single argument, simulated fgrep with a single
argument and no options."""
import sys
if __name__ == "__main__":
pattern = sys.argv[1]
for line in sys.stdin:
if pattern in line:
sys.stdout.write(line)

View File

@@ -1,15 +0,0 @@
import signal, subprocess, sys, time
# On Linux this causes os.waitpid to fail with OSError as the OS has already
# reaped our child process. The wait() passing the OSError on to the caller
# and causing us to exit with an error is what we are testing against.
signal.signal(signal.SIGCHLD, signal.SIG_IGN)
subprocess.Popen([sys.executable, '-c', 'print("albatross")']).wait()
# Also ensure poll() handles an errno.ECHILD appropriately.
p = subprocess.Popen([sys.executable, '-c', 'print("albatross")'])
num_polls = 0
while p.poll() is None:
# Waiting for the process to finish.
time.sleep(0.01) # Avoid being a CPU busy loop.
num_polls += 1
if num_polls > 3000:
raise RuntimeError('poll should have returned 0 within 30 seconds')