From ff0ac5bf2b3069200d2bb5a56bc3eef0b4bcb44a Mon Sep 17 00:00:00 2001 From: Franciszek Malinka Date: Sat, 13 Nov 2021 17:32:03 +0100 Subject: update --- semestr-4/ask/lista13/ask21_lista_13/pagemap | 1 + semestr-5/logika-r/framal-lista2.pdf | Bin 0 -> 1242286 bytes semestr-5/so/lista1/rozwiazania/zad3.c | 10 + semestr-5/so/lista1/so21_lista_1/fileref.c | 11 +- semestr-5/so/lista1/so21_lista_1/test.c | 6 + semestr-5/so/lista2/buffer.c | 13 + semestr-5/so/lista2/echo.c | 11 + semestr-5/so/lista2/segv.c | 22 + semestr-5/so/lista2/segv.s | 87 + semestr-5/so/lista2/signals.c | 30 + semestr-5/so/lista2/sinit | 1 + semestr-5/so/lista2/so21_lista_2/Makefile.include | 105 + semestr-5/so/lista2/so21_lista_2/cycle.c | 57 + semestr-5/so/lista2/so21_lista_2/demand.c | 83 + .../so/lista2/so21_lista_2/include/bitstring.h | 138 + semestr-5/so/lista2/so21_lista_2/include/csapp.h | 240 ++ semestr-5/so/lista2/so21_lista_2/include/queue.h | 587 ++++ semestr-5/so/lista2/so21_lista_2/include/rio.h | 27 + .../so/lista2/so21_lista_2/include/terminal.h | 27 + semestr-5/so/lista2/so21_lista_2/include/tree.h | 735 +++++ semestr-5/so/lista2/so21_lista_2/reaper.c | 59 + semestr-5/so/lista2/test.c | 33 + semestr-5/so/lista3/so21_lista_3/Makefile.include | 105 + semestr-5/so/lista3/so21_lista_3/coro.c | 176 + semestr-5/so/lista3/so21_lista_3/game.c | 118 + .../so/lista3/so21_lista_3/include/bitstring.h | 138 + semestr-5/so/lista3/so21_lista_3/include/csapp.h | 240 ++ semestr-5/so/lista3/so21_lista_3/include/queue.h | 587 ++++ semestr-5/so/lista3/so21_lista_3/include/rio.h | 27 + .../so/lista3/so21_lista_3/include/terminal.h | 27 + semestr-5/so/lista3/so21_lista_3/include/tree.h | 735 +++++ semestr-5/so/lista4/pipeline.log | 3415 ++++++++++++++++++++ semestr-5/so/lista4/pipeline2.log | 3409 +++++++++++++++++++ semestr-5/so/lista4/pipeline3.log | 249 ++ semestr-5/so/lista4/script.log | 428 +++ semestr-5/so/lista4/so21_lista_4.tar.gz | Bin 0 -> 44060 bytes semestr-5/so/lista4/so21_lista_4/Makefile.include | 105 + semestr-5/so/lista4/so21_lista_4/holes.bin | Bin 0 -> 33550336 bytes .../so/lista4/so21_lista_4/include/bitstring.h | 138 + semestr-5/so/lista4/so21_lista_4/include/csapp.h | 240 ++ semestr-5/so/lista4/so21_lista_4/include/queue.h | 587 ++++ semestr-5/so/lista4/so21_lista_4/include/rio.h | 27 + .../so/lista4/so21_lista_4/include/terminal.h | 27 + semestr-5/so/lista4/so21_lista_4/include/tree.h | 735 +++++ semestr-5/so/lista4/so21_lista_4/innocent.c | 55 + semestr-5/so/lista4/so21_lista_4/leaky.c | 30 + semestr-5/so/lista4/so21_lista_4/mkholes.c | 34 + semestr-5/so/lista4/so21_lista_4/zad6.c | 29 + semestr-5/so/lista4/so21_lista_4_v2.pdf | Bin 0 -> 282262 bytes semestr-5/so/lista4/test.c | 7 + semestr-5/so/lista5/so21_lista_5.pdf | Bin 0 -> 277248 bytes semestr-5/so/lista5/so21_lista_5.tar.gz | Bin 0 -> 45364 bytes semestr-5/so/lista5/so21_lista_5/Makefile.include | 105 + semestr-5/so/lista5/so21_lista_5/gen-nums.py | 11 + .../so/lista5/so21_lista_5/include/bitstring.h | 138 + semestr-5/so/lista5/so21_lista_5/include/csapp.h | 240 ++ semestr-5/so/lista5/so21_lista_5/include/queue.h | 587 ++++ semestr-5/so/lista5/so21_lista_5/include/rio.h | 27 + .../so/lista5/so21_lista_5/include/terminal.h | 27 + semestr-5/so/lista5/so21_lista_5/include/tree.h | 735 +++++ semestr-5/so/lista5/so21_lista_5/listdir.c | 118 + semestr-5/so/lista5/so21_lista_5/mergesort.c | 141 + semestr-5/so/lista5/so21_lista_5/prime.c | 97 + semestr-5/so/lista6/so21_lista_6.pdf | Bin 0 -> 271919 bytes semestr-5/so/lista6/so21_lista_6.tar.gz | Bin 0 -> 44101 bytes semestr-5/so/so-shell | 1 + 66 files changed, 16177 insertions(+), 1 deletion(-) create mode 160000 semestr-4/ask/lista13/ask21_lista_13/pagemap create mode 100644 semestr-5/logika-r/framal-lista2.pdf create mode 100644 semestr-5/so/lista1/rozwiazania/zad3.c create mode 100644 semestr-5/so/lista1/so21_lista_1/test.c create mode 100644 semestr-5/so/lista2/buffer.c create mode 100644 semestr-5/so/lista2/echo.c create mode 100644 semestr-5/so/lista2/segv.c create mode 100644 semestr-5/so/lista2/segv.s create mode 100644 semestr-5/so/lista2/signals.c create mode 160000 semestr-5/so/lista2/sinit create mode 100644 semestr-5/so/lista2/so21_lista_2/Makefile.include create mode 100644 semestr-5/so/lista2/so21_lista_2/cycle.c create mode 100644 semestr-5/so/lista2/so21_lista_2/demand.c create mode 100644 semestr-5/so/lista2/so21_lista_2/include/bitstring.h create mode 100644 semestr-5/so/lista2/so21_lista_2/include/csapp.h create mode 100644 semestr-5/so/lista2/so21_lista_2/include/queue.h create mode 100644 semestr-5/so/lista2/so21_lista_2/include/rio.h create mode 100644 semestr-5/so/lista2/so21_lista_2/include/terminal.h create mode 100644 semestr-5/so/lista2/so21_lista_2/include/tree.h create mode 100644 semestr-5/so/lista2/so21_lista_2/reaper.c create mode 100644 semestr-5/so/lista2/test.c create mode 100644 semestr-5/so/lista3/so21_lista_3/Makefile.include create mode 100644 semestr-5/so/lista3/so21_lista_3/coro.c create mode 100644 semestr-5/so/lista3/so21_lista_3/game.c create mode 100644 semestr-5/so/lista3/so21_lista_3/include/bitstring.h create mode 100644 semestr-5/so/lista3/so21_lista_3/include/csapp.h create mode 100644 semestr-5/so/lista3/so21_lista_3/include/queue.h create mode 100644 semestr-5/so/lista3/so21_lista_3/include/rio.h create mode 100644 semestr-5/so/lista3/so21_lista_3/include/terminal.h create mode 100644 semestr-5/so/lista3/so21_lista_3/include/tree.h create mode 100644 semestr-5/so/lista4/pipeline.log create mode 100644 semestr-5/so/lista4/pipeline2.log create mode 100644 semestr-5/so/lista4/pipeline3.log create mode 100644 semestr-5/so/lista4/script.log create mode 100644 semestr-5/so/lista4/so21_lista_4.tar.gz create mode 100644 semestr-5/so/lista4/so21_lista_4/Makefile.include create mode 100644 semestr-5/so/lista4/so21_lista_4/holes.bin create mode 100644 semestr-5/so/lista4/so21_lista_4/include/bitstring.h create mode 100644 semestr-5/so/lista4/so21_lista_4/include/csapp.h create mode 100644 semestr-5/so/lista4/so21_lista_4/include/queue.h create mode 100644 semestr-5/so/lista4/so21_lista_4/include/rio.h create mode 100644 semestr-5/so/lista4/so21_lista_4/include/terminal.h create mode 100644 semestr-5/so/lista4/so21_lista_4/include/tree.h create mode 100644 semestr-5/so/lista4/so21_lista_4/innocent.c create mode 100644 semestr-5/so/lista4/so21_lista_4/leaky.c create mode 100644 semestr-5/so/lista4/so21_lista_4/mkholes.c create mode 100644 semestr-5/so/lista4/so21_lista_4/zad6.c create mode 100644 semestr-5/so/lista4/so21_lista_4_v2.pdf create mode 100644 semestr-5/so/lista4/test.c create mode 100644 semestr-5/so/lista5/so21_lista_5.pdf create mode 100644 semestr-5/so/lista5/so21_lista_5.tar.gz create mode 100644 semestr-5/so/lista5/so21_lista_5/Makefile.include create mode 100755 semestr-5/so/lista5/so21_lista_5/gen-nums.py create mode 100644 semestr-5/so/lista5/so21_lista_5/include/bitstring.h create mode 100644 semestr-5/so/lista5/so21_lista_5/include/csapp.h create mode 100644 semestr-5/so/lista5/so21_lista_5/include/queue.h create mode 100644 semestr-5/so/lista5/so21_lista_5/include/rio.h create mode 100644 semestr-5/so/lista5/so21_lista_5/include/terminal.h create mode 100644 semestr-5/so/lista5/so21_lista_5/include/tree.h create mode 100644 semestr-5/so/lista5/so21_lista_5/listdir.c create mode 100644 semestr-5/so/lista5/so21_lista_5/mergesort.c create mode 100644 semestr-5/so/lista5/so21_lista_5/prime.c create mode 100644 semestr-5/so/lista6/so21_lista_6.pdf create mode 100644 semestr-5/so/lista6/so21_lista_6.tar.gz create mode 160000 semestr-5/so/so-shell diff --git a/semestr-4/ask/lista13/ask21_lista_13/pagemap b/semestr-4/ask/lista13/ask21_lista_13/pagemap new file mode 160000 index 0000000..5f6e58e --- /dev/null +++ b/semestr-4/ask/lista13/ask21_lista_13/pagemap @@ -0,0 +1 @@ +Subproject commit 5f6e58e89460006f90dd91e551eb0f755d732ebe diff --git a/semestr-5/logika-r/framal-lista2.pdf b/semestr-5/logika-r/framal-lista2.pdf new file mode 100644 index 0000000..e4311b1 Binary files /dev/null and b/semestr-5/logika-r/framal-lista2.pdf differ diff --git a/semestr-5/so/lista1/rozwiazania/zad3.c b/semestr-5/so/lista1/rozwiazania/zad3.c new file mode 100644 index 0000000..c575be8 --- /dev/null +++ b/semestr-5/so/lista1/rozwiazania/zad3.c @@ -0,0 +1,10 @@ +#include + +const char *t[2]; + +int main() { + t[0] = "siemandero"; + t[1] = NULL; + + execvp("python", t); +} diff --git a/semestr-5/so/lista1/so21_lista_1/fileref.c b/semestr-5/so/lista1/so21_lista_1/fileref.c index b5d6f9f..8ea7aad 100644 --- a/semestr-5/so/lista1/so21_lista_1/fileref.c +++ b/semestr-5/so/lista1/so21_lista_1/fileref.c @@ -32,7 +32,16 @@ static void do_read(int fd) { static void do_close(int fd) { /* TODO: In the child close file descriptor, in the parent wait for child to * die and check if the file descriptor is still accessible. */ - + int pid = fork(); + if (pid > 0) { + printf("[%d] %d\n", getpid(), fcntl(fd, F_GETFD)); + close(fd); + printf("[%d] %d\n", getpid(), fcntl(fd, F_GETFD)); + } + else { + wait(NULL); + printf("[%d] %d\n", getpid(), fcntl(fd, F_GETFD)); + } exit(0); } diff --git a/semestr-5/so/lista1/so21_lista_1/test.c b/semestr-5/so/lista1/so21_lista_1/test.c new file mode 100644 index 0000000..07e9711 --- /dev/null +++ b/semestr-5/so/lista1/so21_lista_1/test.c @@ -0,0 +1,6 @@ +int main() { + int x = 0; + while (1) { + x += 1; + } +} diff --git a/semestr-5/so/lista2/buffer.c b/semestr-5/so/lista2/buffer.c new file mode 100644 index 0000000..8b549a1 --- /dev/null +++ b/semestr-5/so/lista2/buffer.c @@ -0,0 +1,13 @@ +#include +#include +#include +#include + +int main() +{ + printf("hello world..."); + // fflush(stdout); + fork(); + fork(); + fork(); +} diff --git a/semestr-5/so/lista2/echo.c b/semestr-5/so/lista2/echo.c new file mode 100644 index 0000000..1d26d6f --- /dev/null +++ b/semestr-5/so/lista2/echo.c @@ -0,0 +1,11 @@ +#include + +int main() { + char buffer[1000]; + printf("Echo!\n"); + while (1) { + scanf("%s", buffer); + printf("%s\n", buffer); + } + printf("What?"); +} diff --git a/semestr-5/so/lista2/segv.c b/semestr-5/so/lista2/segv.c new file mode 100644 index 0000000..6aca3ec --- /dev/null +++ b/semestr-5/so/lista2/segv.c @@ -0,0 +1,22 @@ +#include +#include +#include +#include +#include + +volatile int *p = NULL; +int x = 0; + +void segv_handler(int signum) { + char text[100]; + sprintf(text, "Segv handler! p: %p\n", p); + if (p == NULL) + p = &x; + write(STDOUT_FILENO, text, strlen(text)); +} + +int main() { + signal(SIGSEGV, segv_handler); + + *p = 1; +} diff --git a/semestr-5/so/lista2/segv.s b/semestr-5/so/lista2/segv.s new file mode 100644 index 0000000..3545549 --- /dev/null +++ b/semestr-5/so/lista2/segv.s @@ -0,0 +1,87 @@ + .file "segv.c" + .text + .globl p + .bss + .align 8 + .type p, @object + .size p, 8 +p: + .zero 8 + .section .rodata +.LC0: + .string "Segv handler! p: %p\n" + .text + .globl segv_handler + .type segv_handler, @function +segv_handler: +.LFB6: + .cfi_startproc + pushq %rbp + .cfi_def_cfa_offset 16 + .cfi_offset 6, -16 + movq %rsp, %rbp + .cfi_def_cfa_register 6 + addq $-128, %rsp + movl %edi, -116(%rbp) + movq %fs:40, %rax + movq %rax, -8(%rbp) + xorl %eax, %eax + movq p(%rip), %rdx + leaq -112(%rbp), %rax + leaq .LC0(%rip), %rcx + movq %rcx, %rsi + movq %rax, %rdi + movl $0, %eax + call sprintf@PLT + movq p(%rip), %rax + testq %rax, %rax + jne .L2 + movl $8, %edi + call malloc@PLT + movq %rax, p(%rip) +.L2: + leaq -112(%rbp), %rax + movq %rax, %rdi + call strlen@PLT + movq %rax, %rdx + leaq -112(%rbp), %rax + movq %rax, %rsi + movl $1, %edi + call write@PLT + nop + movq -8(%rbp), %rax + subq %fs:40, %rax + je .L3 + call __stack_chk_fail@PLT +.L3: + leave + .cfi_def_cfa 7, 8 + ret + .cfi_endproc +.LFE6: + .size segv_handler, .-segv_handler + .globl main + .type main, @function +main: +.LFB7: + .cfi_startproc + pushq %rbp + .cfi_def_cfa_offset 16 + .cfi_offset 6, -16 + movq %rsp, %rbp + .cfi_def_cfa_register 6 + leaq segv_handler(%rip), %rax + movq %rax, %rsi + movl $11, %edi + call signal@PLT + movq p(%rip), %rax + movb $1, (%rax) + movl $0, %eax + popq %rbp + .cfi_def_cfa 7, 8 + ret + .cfi_endproc +.LFE7: + .size main, .-main + .ident "GCC: (GNU) 11.1.0" + .section .note.GNU-stack,"",@progbits diff --git a/semestr-5/so/lista2/signals.c b/semestr-5/so/lista2/signals.c new file mode 100644 index 0000000..a7593bc --- /dev/null +++ b/semestr-5/so/lista2/signals.c @@ -0,0 +1,30 @@ +#include +#include +#include +#include +#include +#include +#include + +void sig_handler(int signum) { + char text[100]; + sprintf(text, "[%d] Hello, I'm a signal handler :)\n", getpid()); + write(STDOUT_FILENO, text, strlen(text)); +} + +int main() { + signal(SIGUSR1, sig_handler); + printf("Parent: [%d]\n", getpid()); + fflush(stdout); + if (fork() == 0) { + printf("Child: [%d]\n", getpid()); + // while(1) {} + if (execl("./echo-my", "echo-my", NULL) < 0) { + fprintf(stderr, "Exec error: %s\n", strerror(errno)); + exit(0); + } + } + + int result; + wait(&result); +} diff --git a/semestr-5/so/lista2/sinit b/semestr-5/so/lista2/sinit new file mode 160000 index 0000000..28c44b6 --- /dev/null +++ b/semestr-5/so/lista2/sinit @@ -0,0 +1 @@ +Subproject commit 28c44b6b94a870f2942c37f9cfbae8b770595712 diff --git a/semestr-5/so/lista2/so21_lista_2/Makefile.include b/semestr-5/so/lista2/so21_lista_2/Makefile.include new file mode 100644 index 0000000..3408d22 --- /dev/null +++ b/semestr-5/so/lista2/so21_lista_2/Makefile.include @@ -0,0 +1,105 @@ +CC = gcc -g +CFLAGS = -Og -Wall -Wstrict-prototypes +AS = as -g +ASFLAGS = +CPPFLAGS = -Iinclude +LDLIBS = -Llibcsapp -lcsapp +SED = sed + +# Recognize operating system +ifeq ($(shell uname -s), Darwin) +CPPFLAGS += -DMACOS +SED = gsed +endif + +ifeq ($(shell uname -s), Linux) +CPPFLAGS += -DLINUX +endif + +ifeq ($(shell uname -s), FreeBSD) +CPPFLAGS += -DFREEBSD +endif + +# Pass "VERBOSE=1" at command line to display command being invoked by GNU Make +ifneq ($(VERBOSE), 1) +.SILENT: +endif + +LIBSRC_C = $(wildcard libcsapp/*.c) +LIBSRC_S = $(wildcard libcsapp/*.s) +LIBSRC_H = $(wildcard include/*.h) +LIBSRCS = $(LIBSRC_C) $(LIBSRC_S) $(LIBSRC_H) +LIBOBJS = $(LIBSRC_C:%.c=%.o) +ifneq ($(shell uname -s), Darwin) +LIBOBJS += $(LIBSRC_S:%.s=%.o) +endif +LIB = libcsapp/libcsapp.a + +SRC_C = $(wildcard *.c) +SRC_S = $(wildcard *.s) +SRC_H = $(wildcard *.h) +SRCS = $(SRC_C) $(SRC_S) +OBJS = $(SRC_C:%.c=%.o) + +SOURCES = $(SRCS) $(LIBSRCS) +OBJECTS = $(OBJS) $(LIBOBJS) +DEPFILES = $(foreach f,$(SRC_C) $(LIBSRC_C),\ + $(dir $(f))$(patsubst %.c,.%.d,$(notdir $(f)))) + +ARCHIVE = so$(shell date +'%y')_$(shell basename $(PWD)) +FILES = Makefile Makefile.include $(EXTRA-FILES) + +all: $(DEPFILES) $(LIB) $(PROGS) + +$(LIB): $(LIBOBJS) + +# Generate dependencies automatically +ifeq ($(words $(findstring $(MAKECMDGOALS), archive clean)), 0) + -include $(DEPFILES) +endif + +# Disable all built-in recipes and define our own +.SUFFIXES: + +.%.d: %.c + $(CC) $(CPPFLAGS) -MM -MG -o $@ $< + +%.o: %.c .%.d + @echo "[CC] $@ <- $<" + $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< + +%.o: %.s + @echo "[AS] $@ <- $<" + $(AS) $(ASFLAGS) -c -o $@ $< + +%.a: + @echo "[AR] $@ <- $^" + $(AR) rc $@ $^ + +%: %.o $(LIB) + @echo "[LD] $@ <- $^" + $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) + +clean: + rm -vf $(PROGS) $(OBJECTS) $(DEPFILES) $(LIB) + rm -vf $(shell find -L . -iname '*~') + rm -vf $(ARCHIVE).tar.gz + rm -vrf $(EXTRA-CLEAN) *.dSYM + +format: + clang-format --style=file -i $(LIBSRC_C) $(LIBSRC_H) $(SRC_C) $(SRC_H) + +archive: clean + mkdir -p $(ARCHIVE) $(ARCHIVE)/libcsapp $(ARCHIVE)/include + cp -L $(SRCS) $(SRC_H) $(FILES) $(ARCHIVE)/ + cp -L $(LIBSRCS) $(ARCHIVE)/libcsapp/ + cp -L $(LIBSRC_H) $(ARCHIVE)/include/ + for f in $(SRCS:%=$(ARCHIVE)/%); do \ + $(SED) --in-place='' -e '/^#if.*STUDENT/,/^#endif.*STUDENT/d' $$f; \ + done + tar cvzhf $(ARCHIVE).tar.gz $(ARCHIVE) + rm -rf $(ARCHIVE) + +.PHONY: all clean format archive + +# vim: ts=8 sw=8 noet diff --git a/semestr-5/so/lista2/so21_lista_2/cycle.c b/semestr-5/so/lista2/so21_lista_2/cycle.c new file mode 100644 index 0000000..7daf754 --- /dev/null +++ b/semestr-5/so/lista2/so21_lista_2/cycle.c @@ -0,0 +1,57 @@ +#include "csapp.h" + +static void signal_handler(int signum, siginfo_t *info, void *data) { + if (signum == SIGINT) { + safe_printf("(%d) Screw you guys... I'm going home!\n", getpid()); + _exit(0); + } +} + +static void play(pid_t next, const sigset_t *set) { + for (;;) { + printf("(%d) Waiting for a ball!\n", getpid()); + /* TODO: Something is missing here! */ + sigset_t mask; + sigfillset(&mask); + sigdelset(&mask, SIGUSR1); + sigdelset(&mask, SIGINT); + Sigsuspend(&mask); + usleep((300 + random() % 400) * 1000); + Kill(next, SIGUSR1); + printf("(%d) Passing ball to (%d)!\n", getpid(), next); + } +} + +int main(int argc, char *argv[]) { + if (argc != 2) + app_error("Usage: %s [CHILDREN]", argv[0]); + + int children = atoi(argv[1]); + + if (children < 4 || children > 20) + app_error("Give number of children in range from 4 to 20!"); + + /* Register signal handler for SIGUSR1 */ + struct sigaction action = {.sa_sigaction = signal_handler}; + Sigaction(SIGINT, &action, NULL); + Sigaction(SIGUSR1, &action, NULL); + + /* TODO: Start all processes and make them wait for the ball! */ + sigset_t mask; + sigfillset(&mask); + sigprocmask(SIG_BLOCK, &mask, NULL); + + pid_t prev_pid = getpid(); + + for (int i = 1; i <= children; i++) { + int pid = Fork(); + if (pid == 0) { + play(prev_pid, NULL); + } + prev_pid = pid; + } + + Kill(prev_pid, SIGUSR1); + play(prev_pid, NULL); + return EXIT_SUCCESS; +} diff --git a/semestr-5/so/lista2/so21_lista_2/demand.c b/semestr-5/so/lista2/so21_lista_2/demand.c new file mode 100644 index 0000000..d4ae715 --- /dev/null +++ b/semestr-5/so/lista2/so21_lista_2/demand.c @@ -0,0 +1,83 @@ +#include "csapp.h" + +/* First address of handled region. */ +#define ADDR_START ((void *)0x10000000) +/* Last address of handled region (not inclusive). */ +#define ADDR_END ((void *)0x10010000) + +static size_t pagesize; + +/* Maps anonymouse page with `prot` access permissions at `addr` address. */ +static void mmap_page(void *addr, int prot) { + Mmap(addr, pagesize, prot, MAP_ANONYMOUS | MAP_PRIVATE | MAP_FIXED, -1, 0); +} + +/* Changes protection bits to `prot` for page at `addr` address. */ +static void mprotect_page(void *addr, int prot) { + Mprotect(addr, pagesize, prot); +} + +static void sigsegv_handler(int signum, siginfo_t *info, void *data) { + ucontext_t *uc = data; + // intptr_t rip; + + /* TODO: You need to get value of instruction pointer register from `uc`. + * Print all useful data from `info` and quit in such a way that a shell + * reports program has been terminated with SIGSEGV. */ + + #define REG_RIP 16 + + intptr_t fault_instr = uc->uc_mcontext.gregs[REG_RIP]; + intptr_t fault_address = (intptr_t)info->si_addr; + intptr_t fault_page = fault_address / pagesize * pagesize; + + safe_printf("Fault at rip=%lx, accessing %lx! ", fault_instr, fault_address); + if ((void *)fault_address < ADDR_START || (void *)fault_address >= ADDR_END) { + safe_printf("Address not mapped - terminating!\n"); + _exit(128 + SIGSEGV); + } + + switch(info->si_code) { + case SEGV_MAPERR: + safe_printf("Map missing page at %lx.\n", fault_page); + mmap_page((void *)fault_page, PROT_READ); + break; + + case SEGV_ACCERR: + safe_printf("Make page at %lx writable.\n", fault_page); + mprotect_page((void *)fault_page, PROT_READ | PROT_WRITE); + break; + + default: + safe_printf("Uknkonw code: %d.\n", info->si_code); + _exit(128 + SIGSEGV); + } +} + +int main(int argc, char **argv) { + pagesize = sysconf(_SC_PAGESIZE); + + /* Register signal handler for SIGSEGV */ + struct sigaction action = {.sa_sigaction = sigsegv_handler, + .sa_flags = SA_SIGINFO}; + sigaction(SIGSEGV, &action, NULL); + + /* Initially all pages in the range are either not mapped or readonly! */ + for (void *addr = ADDR_START; addr < ADDR_END; addr += pagesize) + if (random() % 2) + mmap_page(addr, PROT_READ); + + /* Generate lots of writes to the region. */ + volatile long *array = ADDR_START; + long nelems = (ADDR_END - ADDR_START) / sizeof(long); + + for (long i = 0; i < nelems * 2; i++) { + long index = random() % nelems; + array[index] = (long)&array[index]; + } + + /* Perform off by one access - triggering a real fault! */ + array[nelems] = 0xDEADC0DE; + + return EXIT_SUCCESS; +} diff --git a/semestr-5/so/lista2/so21_lista_2/include/bitstring.h b/semestr-5/so/lista2/so21_lista_2/include/bitstring.h new file mode 100644 index 0000000..66503f0 --- /dev/null +++ b/semestr-5/so/lista2/so21_lista_2/include/bitstring.h @@ -0,0 +1,138 @@ +/* $NetBSD: bitstring.h,v 1.14 2016/03/17 02:25:32 christos Exp $ */ + +/* + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Paul Vixie. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)bitstring.h 8.1 (Berkeley) 7/19/93 + */ + +#ifndef _BITSTRING_H_ +#define _BITSTRING_H_ + +/* modified for SV/AT and bitstring bugfix by M.R.Murphy, 11oct91 + * bitstr_size changed gratuitously, but shorter + * bit_alloc spelling error fixed + * the following were efficient, but didn't work, they've been made to + * work, but are no longer as efficient :-) + * bit_nclear, bit_nset, bit_ffc, bit_ffs + */ +/* + * The comment above may or may not bear any resemblance to reality. + * This code has been maintained in a confusing way, with little + * information available on the provenance of much of it. "At least it + * works." + * /s/ Perry E. Metzger, 2 Feb 98 + */ +typedef unsigned char bitstr_t; + +/* internal macros */ +/* byte of the bitstring bit is in */ +#define _bit_byte(bit) (uint32_t)((bit) >> 3) + +/* mask for the bit within its byte */ +#define _bit_mask(bit) (uint32_t)((1 << (uint32_t)((bit)&0x7))) + +/* external macros */ +/* bytes in a bitstring of nbits bits */ +#define bitstr_size(nbits) (size_t)((uint32_t)((nbits) + 7) >> 3) + +/* allocate a bitstring */ +#define bit_alloc(nbits) calloc(bitstr_size(nbits), sizeof(bitstr_t)) + +/* allocate a bitstring on the stack */ +#define bit_decl(name, nbits) ((name)[bitstr_size(nbits)]) + +/* is bit N of bitstring name set? */ +#define bit_test(name, bit) \ + /*LINTED bitwise on signed*/ ((name)[_bit_byte(bit)] & _bit_mask(bit)) + +/* set bit N of bitstring name */ +#define bit_set(name, bit) \ + /*LINTED bitwise on signed*/ \ + ((name)[_bit_byte(bit)] = \ + (unsigned char)(_bit_mask(bit) | (name)[_bit_byte(bit)])) + +/* clear bit N of bitstring name */ +#define bit_clear(name, bit) \ + /*LINTED bitwise on signed*/ \ + ((name)[_bit_byte(bit)] &= (unsigned char)~_bit_mask(bit)) + +/* clear bits start ... stop in bitstring */ +#define bit_nclear(name, start, stop) \ + do { \ + bitstr_t *_name = name; \ + size_t _start = start, _stop = stop; \ + while (_start <= _stop) { \ + bit_clear(_name, _start); \ + _start++; \ + } \ + } while (/*CONSTCOND*/ 0) + +/* set bits start ... stop in bitstring */ +#define bit_nset(name, start, stop) \ + do { \ + bitstr_t *_name = name; \ + size_t _start = start, _stop = stop; \ + while (_start <= _stop) { \ + bit_set(_name, _start); \ + _start++; \ + } \ + } while (/*CONSTCOND*/ 0) + +/* find first bit clear in name */ +#define bit_ffc(name, nbits, value) \ + do { \ + const bitstr_t *_name = name; \ + size_t _bit, _nbits = nbits; \ + int _value = -1; \ + for (_bit = 0; _bit < _nbits; ++_bit) \ + if (!bit_test(_name, _bit)) { \ + _value = _bit; \ + break; \ + } \ + *(value) = _value; \ + } while (/*CONSTCOND*/ 0) + +/* find first bit set in name */ +#define bit_ffs(name, nbits, value) \ + do { \ + const bitstr_t *_name = name; \ + size_t _bit, _nbits = nbits; \ + int _value = -1; \ + for (_bit = 0; _bit < _nbits; ++_bit) \ + if (bit_test(_name, _bit)) { \ + _value = _bit; \ + break; \ + } \ + *(value) = _value; \ + } while (/*CONSTCOND*/ 0) + +#endif /* !_BITSTRING_H_ */ diff --git a/semestr-5/so/lista2/so21_lista_2/include/csapp.h b/semestr-5/so/lista2/so21_lista_2/include/csapp.h new file mode 100644 index 0000000..dabdf77 --- /dev/null +++ b/semestr-5/so/lista2/so21_lista_2/include/csapp.h @@ -0,0 +1,240 @@ +#ifndef __CSAPP_H__ +#define __CSAPP_H__ + +#include +#include +#ifdef LINUX +#include +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define _CONCAT(x, y) x##y +#define CONCAT(x, y) _CONCAT(x, y) + +#define min(a, b) \ + ({ \ + typeof(a) _a = (a); \ + typeof(b) _b = (b); \ + _a < _b ? _a : _b; \ + }) + +#define max(a, b) \ + ({ \ + typeof(a) _a = (a); \ + typeof(b) _b = (b); \ + _a > _b ? _a : _b; \ + }) + +#ifndef powerof2 +#define powerof2(x) (((x) & ((x)-1)) == 0) +#endif + +#ifndef __unused +#define __unused __attribute__((unused)) +#endif + +extern char **environ; + +/* Useful constants. */ +#define MAXLINE 4096 + +/* Our own error-handling functions */ +noreturn void unix_error(const char *fmt, ...) + __attribute__((format(printf, 1, 2))); +noreturn void posix_error(int code, const char *fmt, ...) + __attribute__((format(printf, 2, 3))); +noreturn void app_error(const char *fmt, ...) + __attribute__((format(printf, 1, 2))); +noreturn void gai_error(int code, const char *fmt, ...) + __attribute__((format(printf, 2, 3))); + +/* Signal safe I/O functions */ +void safe_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2))); +void safe_error(const char *fmt, ...) __attribute__((format(printf, 1, 2))); + +/* Decent hashing function. */ +#define HASHINIT 5381 + +uint32_t jenkins_hash(const void *key, size_t length, uint32_t initval); + +/* Memory allocation wrappers */ +void *Malloc(size_t size); +void *Realloc(void *ptr, size_t size); +void *Calloc(size_t nmemb, size_t size); + +/* Process control wrappers */ +pid_t Fork(void); +pid_t Waitpid(pid_t pid, int *iptr, int options); +#define Wait(iptr) Waitpid(-1, iptr, 0) +void Prctl(int option, long arg); + +/* Process environment */ +char *Getcwd(char *buf, size_t buflen); + +/* Signal control wrappers */ +void (*Signal(int sig, void (*func)(int)))(int); +void Kill(pid_t pid, int sig); +void Sigprocmask(int how, const sigset_t *set, sigset_t *oldset); +void Sigaction(int signum, const struct sigaction *act, + struct sigaction *oldact); +void Sigsuspend(const sigset_t *mask); + +/* Process group control wrappers */ +void Setpgid(pid_t pid, pid_t pgid); + +/* Stdio wrappers */ +char *Fgets(char *ptr, int n, FILE *stream); +void Fputs(const char *ptr, FILE *stream); + +/* Unix I/O wrappers */ +int Open(const char *pathname, int flags, mode_t mode); +size_t Read(int fd, void *buf, size_t count); +size_t Write(int fd, const void *buf, size_t count); +size_t Writev(int fd, const struct iovec *iov, int iovcnt); +off_t Lseek(int fildes, off_t offset, int whence); +void Close(int fd); +void Ftruncate(int fd, off_t length); +int Dup(int fd); +int Dup2(int oldfd, int newfd); +void Pipe(int fds[2]); +void Socketpair(int domain, int type, int protocol, int sv[2]); +int Select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, + struct timeval *timeout); +int Poll(struct pollfd *fds, nfds_t nfds, int timeout); + +/* Directory access (Linux specific) */ +struct linux_dirent { + unsigned long d_ino; /* Inode number */ + unsigned long d_off; /* Offset to next linux_dirent */ + unsigned short d_reclen; /* Length of this linux_dirent */ + char d_name[]; /* Filename (null-terminated) */ +}; + +int Getdents(int fd, struct linux_dirent *dirp, unsigned count); + +/* Directory operations */ +void Rename(const char *oldpath, const char *newpath); +void Unlink(const char *pathname); + +/* File metadata access wrapper */ +void Fstat(int fd, struct stat *statbuf); +void Fstatat(int dirfd, const char *pathname, struct stat *statbuf, int flags); +size_t Readlink(const char *pathname, char *buf, size_t bufsiz); +size_t Readlinkat(int dirfd, const char *pathname, char *buf, size_t bufsiz); + +/* Memory mapped files & anonymous memory */ +void *Mmap(void *addr, size_t length, int prot, int flags, int fd, + off_t offset); +void Mprotect(void *addr, size_t len, int prot); +void Munmap(void *addr, size_t len); +void Madvise(void *addr, size_t length, int advice); + +/* Terminal control */ +void Tcsetpgrp(int fd, pid_t pgrp); +pid_t Tcgetpgrp(int fd); +void Tcsetattr(int fd, int action, const struct termios *termios_p); +void Tcgetattr(int fd, struct termios *termios_p); + +/* Setjmp & longjmp implementation without sigprocmask */ +typedef struct { + long rbx; + long rbp; + long r12; + long r13; + long r14; + long r15; + void *rsp; + void *rip; +} Jmpbuf[1]; + +int Setjmp(Jmpbuf env); +noreturn void Longjmp(Jmpbuf env, int val); + +/* Socket interface wrappers. */ +typedef struct sockaddr SA; +int Socket(int domain, int type, int protocol); +void Setsockopt(int s, int level, int optname, const void *optval, int optlen); +void Bind(int sockfd, struct sockaddr *my_addr, int addrlen); +void Listen(int s, int backlog); +int Accept(int s, struct sockaddr *addr, socklen_t *addrlen); +void Connect(int sockfd, struct sockaddr *serv_addr, int addrlen); + +/* Protocol-independent wrappers. */ +void Getaddrinfo(const char *node, const char *service, + const struct addrinfo *hints, struct addrinfo **res); +void Getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, + size_t hostlen, char *serv, size_t servlen, int flags); +int open_clientfd(char *hostname, char *port); +int Open_clientfd(char *hostname, char *port); +int open_listenfd(char *port, int backlog); +int Open_listenfd(char *port, int backlog); + +/* POSIX thread control wrappers. */ + +void Pthread_create(pthread_t *tidp, pthread_attr_t *attrp, + void *(*routine)(void *), void *argp); +void Pthread_cancel(pthread_t tid); +void Pthread_join(pthread_t tid, void **thread_return); +void Pthread_detach(pthread_t tid); + +/* POSIX semaphore wrappers. */ +void Sem_init(sem_t *sem, int pshared, unsigned value); +void Sem_destroy(sem_t *sem); +void Sem_wait(sem_t *sem); +void Sem_getvalue(sem_t *sem, int *sval); +void Sem_post(sem_t *sem); + +/* POSIX mutex wrappers. */ +void Pthread_mutex_init(pthread_mutex_t *mutex, + const pthread_mutexattr_t *mutexattr); +void Pthread_mutex_destroy(pthread_mutex_t *mutex); +void Pthread_mutex_lock(pthread_mutex_t *mutex); +void Pthread_mutex_unlock(pthread_mutex_t *mutex); + +/* POSIX conditional variable wrappers. */ +void Pthread_cond_init(pthread_cond_t *cond, pthread_condattr_t *cond_attr); +void Pthread_cond_destroy(pthread_cond_t *cond); +void Pthread_cond_signal(pthread_cond_t *cond); +void Pthread_cond_broadcast(pthread_cond_t *cond); +void Pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex); + +/* POSIX reader-writer lock wrappers. */ +void Pthread_rwlock_init(pthread_rwlock_t *rwlock, + const pthread_rwlockattr_t *rwlockattr); +void Pthread_rwlock_destroy(pthread_rwlock_t *rwlock); +void Pthread_rwlock_rdlock(pthread_rwlock_t *rwlock); +void Pthread_rwlock_wrlock(pthread_rwlock_t *rwlock); +void Pthread_rwlock_unlock(pthread_rwlock_t *rwlock); + +#endif /* __CSAPP_H__ */ diff --git a/semestr-5/so/lista2/so21_lista_2/include/queue.h b/semestr-5/so/lista2/so21_lista_2/include/queue.h new file mode 100644 index 0000000..de4ddc9 --- /dev/null +++ b/semestr-5/so/lista2/so21_lista_2/include/queue.h @@ -0,0 +1,587 @@ +/* $NetBSD: queue.h,v 1.74 2019/03/23 12:01:18 maxv Exp $ */ + +/* + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)queue.h 8.5 (Berkeley) 8/20/94 + */ + +#ifndef _QUEUE_H_ +#define _QUEUE_H_ + +/* + * This file defines five types of data structures: singly-linked lists, + * lists, simple queues, tail queues, and circular queues. + * + * A singly-linked list is headed by a single forward pointer. The + * elements are singly linked for minimum space and pointer manipulation + * overhead at the expense of O(n) removal for arbitrary elements. New + * elements can be added to the list after an existing element or at the + * head of the list. Elements being removed from the head of the list + * should use the explicit macro for this purpose for optimum + * efficiency. A singly-linked list may only be traversed in the forward + * direction. Singly-linked lists are ideal for applications with large + * datasets and few or no removals or for implementing a LIFO queue. + * + * A list is headed by a single forward pointer (or an array of forward + * pointers for a hash table header). The elements are doubly linked + * so that an arbitrary element can be removed without a need to + * traverse the list. New elements can be added to the list before + * or after an existing element or at the head of the list. A list + * may only be traversed in the forward direction. + * + * A simple queue is headed by a pair of pointers, one the head of the + * list and the other to the tail of the list. The elements are singly + * linked to save space, so elements can only be removed from the + * head of the list. New elements can be added to the list after + * an existing element, at the head of the list, or at the end of the + * list. A simple queue may only be traversed in the forward direction. + * + * A tail queue is headed by a pair of pointers, one to the head of the + * list and the other to the tail of the list. The elements are doubly + * linked so that an arbitrary element can be removed without a need to + * traverse the list. New elements can be added to the list before or + * after an existing element, at the head of the list, or at the end of + * the list. A tail queue may be traversed in either direction. + * + * A circle queue is headed by a pair of pointers, one to the head of the + * list and the other to the tail of the list. The elements are doubly + * linked so that an arbitrary element can be removed without a need to + * traverse the list. New elements can be added to the list before or after + * an existing element, at the head of the list, or at the end of the list. + * A circle queue may be traversed in either direction, but has a more + * complex end of list detection. + * + * For details on the use of these macros, see the queue(3) manual page. + */ + +/* + * Include the definition of NULL only on NetBSD because sys/null.h + * is not available elsewhere. This conditional makes the header + * portable and it can simply be dropped verbatim into any system. + * The caveat is that on other systems some other header + * must provide NULL before the macros can be used. + */ + +/* + * Singly-linked List definitions. + */ +#define SLIST_HEAD(name, type) \ + struct name { \ + struct type *slh_first; /* first element */ \ + } + +#define SLIST_HEAD_INITIALIZER(head) \ + { NULL } + +#define SLIST_ENTRY(type) \ + struct { \ + struct type *sle_next; /* next element */ \ + } + +/* + * Singly-linked List access methods. + */ +#define SLIST_FIRST(head) ((head)->slh_first) +#define SLIST_END(head) NULL +#define SLIST_EMPTY(head) ((head)->slh_first == NULL) +#define SLIST_NEXT(elm, field) ((elm)->field.sle_next) + +#define SLIST_FOREACH(var, head, field) \ + for ((var) = (head)->slh_first; (var) != SLIST_END(head); \ + (var) = (var)->field.sle_next) + +#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ + for ((var) = SLIST_FIRST((head)); \ + (var) != SLIST_END(head) && ((tvar) = SLIST_NEXT((var), field), 1); \ + (var) = (tvar)) + +/* + * Singly-linked List functions. + */ +#define SLIST_INIT(head) \ + do { \ + (head)->slh_first = SLIST_END(head); \ + } while (/*CONSTCOND*/ 0) + +#define SLIST_INSERT_AFTER(slistelm, elm, field) \ + do { \ + (elm)->field.sle_next = (slistelm)->field.sle_next; \ + (slistelm)->field.sle_next = (elm); \ + } while (/*CONSTCOND*/ 0) + +#define SLIST_INSERT_HEAD(head, elm, field) \ + do { \ + (elm)->field.sle_next = (head)->slh_first; \ + (head)->slh_first = (elm); \ + } while (/*CONSTCOND*/ 0) + +#define SLIST_REMOVE_AFTER(slistelm, field) \ + do { \ + (slistelm)->field.sle_next = \ + SLIST_NEXT(SLIST_NEXT((slistelm), field), field); \ + } while (/*CONSTCOND*/ 0) + +#define SLIST_REMOVE_HEAD(head, field) \ + do { \ + (head)->slh_first = (head)->slh_first->field.sle_next; \ + } while (/*CONSTCOND*/ 0) + +#define SLIST_REMOVE(head, elm, type, field) \ + do { \ + if ((head)->slh_first == (elm)) { \ + SLIST_REMOVE_HEAD((head), field); \ + } else { \ + struct type *curelm = (head)->slh_first; \ + while (curelm->field.sle_next != (elm)) \ + curelm = curelm->field.sle_next; \ + curelm->field.sle_next = curelm->field.sle_next->field.sle_next; \ + } \ + } while (/*CONSTCOND*/ 0) + +/* + * List definitions. + */ +#define LIST_HEAD(name, type) \ + struct name { \ + struct type *lh_first; /* first element */ \ + } + +#define LIST_HEAD_INITIALIZER(head) \ + { NULL } + +#define LIST_ENTRY(type) \ + struct { \ + struct type *le_next; /* next element */ \ + struct type **le_prev; /* address of previous next element */ \ + } + +/* + * List access methods. + */ +#define LIST_FIRST(head) ((head)->lh_first) +#define LIST_END(head) NULL +#define LIST_EMPTY(head) ((head)->lh_first == LIST_END(head)) +#define LIST_NEXT(elm, field) ((elm)->field.le_next) + +#define LIST_FOREACH(var, head, field) \ + for ((var) = ((head)->lh_first); (var) != LIST_END(head); \ + (var) = ((var)->field.le_next)) + +#define LIST_FOREACH_SAFE(var, head, field, tvar) \ + for ((var) = LIST_FIRST((head)); \ + (var) != LIST_END(head) && ((tvar) = LIST_NEXT((var), field), 1); \ + (var) = (tvar)) + +#define LIST_MOVE(head1, head2, field) \ + do { \ + LIST_INIT((head2)); \ + if (!LIST_EMPTY((head1))) { \ + (head2)->lh_first = (head1)->lh_first; \ + (head2)->lh_first->field.le_prev = &(head2)->lh_first; \ + LIST_INIT((head1)); \ + } \ + } while (/*CONSTCOND*/ 0) + +/* + * List functions. + */ +#define LIST_INIT(head) \ + do { \ + (head)->lh_first = LIST_END(head); \ + } while (/*CONSTCOND*/ 0) + +#define LIST_INSERT_AFTER(listelm, elm, field) \ + do { \ + if (((elm)->field.le_next = (listelm)->field.le_next) != LIST_END(head)) \ + (listelm)->field.le_next->field.le_prev = &(elm)->field.le_next; \ + (listelm)->field.le_next = (elm); \ + (elm)->field.le_prev = &(listelm)->field.le_next; \ + } while (/*CONSTCOND*/ 0) + +#define LIST_INSERT_BEFORE(listelm, elm, field) \ + do { \ + (elm)->field.le_prev = (listelm)->field.le_prev; \ + (elm)->field.le_next = (listelm); \ + *(listelm)->field.le_prev = (elm); \ + (listelm)->field.le_prev = &(elm)->field.le_next; \ + } while (/*CONSTCOND*/ 0) + +#define LIST_INSERT_HEAD(head, elm, field) \ + do { \ + if (((elm)->field.le_next = (head)->lh_first) != LIST_END(head)) \ + (head)->lh_first->field.le_prev = &(elm)->field.le_next; \ + (head)->lh_first = (elm); \ + (elm)->field.le_prev = &(head)->lh_first; \ + } while (/*CONSTCOND*/ 0) + +#define LIST_REMOVE(elm, field) \ + do { \ + if ((elm)->field.le_next != NULL) \ + (elm)->field.le_next->field.le_prev = (elm)->field.le_prev; \ + *(elm)->field.le_prev = (elm)->field.le_next; \ + } while (/*CONSTCOND*/ 0) + +#define LIST_REPLACE(elm, elm2, field) \ + do { \ + if (((elm2)->field.le_next = (elm)->field.le_next) != NULL) \ + (elm2)->field.le_next->field.le_prev = &(elm2)->field.le_next; \ + (elm2)->field.le_prev = (elm)->field.le_prev; \ + *(elm2)->field.le_prev = (elm2); \ + } while (/*CONSTCOND*/ 0) + +/* + * Simple queue definitions. + */ +#define SIMPLEQ_HEAD(name, type) \ + struct name { \ + struct type *sqh_first; /* first element */ \ + struct type **sqh_last; /* addr of last next element */ \ + } + +#define SIMPLEQ_HEAD_INITIALIZER(head) \ + { NULL, &(head).sqh_first } + +#define SIMPLEQ_ENTRY(type) \ + struct { \ + struct type *sqe_next; /* next element */ \ + } + +/* + * Simple queue access methods. + */ +#define SIMPLEQ_FIRST(head) ((head)->sqh_first) +#define SIMPLEQ_END(head) NULL +#define SIMPLEQ_EMPTY(head) ((head)->sqh_first == SIMPLEQ_END(head)) +#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next) + +#define SIMPLEQ_FOREACH(var, head, field) \ + for ((var) = ((head)->sqh_first); (var) != SIMPLEQ_END(head); \ + (var) = ((var)->field.sqe_next)) + +#define SIMPLEQ_FOREACH_SAFE(var, head, field, next) \ + for ((var) = ((head)->sqh_first); \ + (var) != SIMPLEQ_END(head) && ((next = ((var)->field.sqe_next)), 1); \ + (var) = (next)) + +/* + * Simple queue functions. + */ +#define SIMPLEQ_INIT(head) \ + do { \ + (head)->sqh_first = NULL; \ + (head)->sqh_last = &(head)->sqh_first; \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_INSERT_HEAD(head, elm, field) \ + do { \ + if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \ + (head)->sqh_last = &(elm)->field.sqe_next; \ + (head)->sqh_first = (elm); \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_INSERT_TAIL(head, elm, field) \ + do { \ + (elm)->field.sqe_next = NULL; \ + *(head)->sqh_last = (elm); \ + (head)->sqh_last = &(elm)->field.sqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) \ + do { \ + if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL) \ + (head)->sqh_last = &(elm)->field.sqe_next; \ + (listelm)->field.sqe_next = (elm); \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_REMOVE_HEAD(head, field) \ + do { \ + if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \ + (head)->sqh_last = &(head)->sqh_first; \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_REMOVE_AFTER(head, elm, field) \ + do { \ + if (((elm)->field.sqe_next = (elm)->field.sqe_next->field.sqe_next) == \ + NULL) \ + (head)->sqh_last = &(elm)->field.sqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_REMOVE(head, elm, type, field) \ + do { \ + if ((head)->sqh_first == (elm)) { \ + SIMPLEQ_REMOVE_HEAD((head), field); \ + } else { \ + struct type *curelm = (head)->sqh_first; \ + while (curelm->field.sqe_next != (elm)) \ + curelm = curelm->field.sqe_next; \ + if ((curelm->field.sqe_next = curelm->field.sqe_next->field.sqe_next) == \ + NULL) \ + (head)->sqh_last = &(curelm)->field.sqe_next; \ + } \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_CONCAT(head1, head2) \ + do { \ + if (!SIMPLEQ_EMPTY((head2))) { \ + *(head1)->sqh_last = (head2)->sqh_first; \ + (head1)->sqh_last = (head2)->sqh_last; \ + SIMPLEQ_INIT((head2)); \ + } \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_LAST(head, type, field) \ + (SIMPLEQ_EMPTY((head)) \ + ? NULL \ + : ((struct type *)(void *)((char *)((head)->sqh_last) - \ + offsetof(struct type, field)))) + +/* + * Tail queue definitions. + */ +#define _TAILQ_HEAD(name, type, qual) \ + struct name { \ + qual type *tqh_first; /* first element */ \ + qual type *qual *tqh_last; /* addr of last next element */ \ + } +#define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type, ) + +#define TAILQ_HEAD_INITIALIZER(head) \ + { TAILQ_END(head), &(head).tqh_first } + +#define _TAILQ_ENTRY(type, qual) \ + struct { \ + qual type *tqe_next; /* next element */ \ + qual type *qual *tqe_prev; /* address of previous next element */ \ + } +#define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type, ) + +/* + * Tail queue access methods. + */ +#define TAILQ_FIRST(head) ((head)->tqh_first) +#define TAILQ_END(head) (NULL) +#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) +#define TAILQ_LAST(head, headname) \ + (*(((struct headname *)(void *)((head)->tqh_last))->tqh_last)) +#define TAILQ_PREV(elm, headname, field) \ + (*(((struct headname *)(void *)((elm)->field.tqe_prev))->tqh_last)) +#define TAILQ_EMPTY(head) (TAILQ_FIRST(head) == TAILQ_END(head)) + +#define TAILQ_FOREACH(var, head, field) \ + for ((var) = ((head)->tqh_first); (var) != TAILQ_END(head); \ + (var) = ((var)->field.tqe_next)) + +#define TAILQ_FOREACH_SAFE(var, head, field, next) \ + for ((var) = ((head)->tqh_first); \ + (var) != TAILQ_END(head) && ((next) = TAILQ_NEXT(var, field), 1); \ + (var) = (next)) + +#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ + for ((var) = TAILQ_LAST((head), headname); (var) != TAILQ_END(head); \ + (var) = TAILQ_PREV((var), headname, field)) + +#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, prev) \ + for ((var) = TAILQ_LAST((head), headname); \ + (var) != TAILQ_END(head) && \ + ((prev) = TAILQ_PREV((var), headname, field), 1); \ + (var) = (prev)) + +/* + * Tail queue functions. + */ +#define TAILQ_INIT(head) \ + do { \ + (head)->tqh_first = TAILQ_END(head); \ + (head)->tqh_last = &(head)->tqh_first; \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_INSERT_HEAD(head, elm, field) \ + do { \ + if (((elm)->field.tqe_next = (head)->tqh_first) != TAILQ_END(head)) \ + (head)->tqh_first->field.tqe_prev = &(elm)->field.tqe_next; \ + else \ + (head)->tqh_last = &(elm)->field.tqe_next; \ + (head)->tqh_first = (elm); \ + (elm)->field.tqe_prev = &(head)->tqh_first; \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_INSERT_TAIL(head, elm, field) \ + do { \ + (elm)->field.tqe_next = TAILQ_END(head); \ + (elm)->field.tqe_prev = (head)->tqh_last; \ + *(head)->tqh_last = (elm); \ + (head)->tqh_last = &(elm)->field.tqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_INSERT_AFTER(head, listelm, elm, field) \ + do { \ + if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != \ + TAILQ_END(head)) \ + (elm)->field.tqe_next->field.tqe_prev = &(elm)->field.tqe_next; \ + else \ + (head)->tqh_last = &(elm)->field.tqe_next; \ + (listelm)->field.tqe_next = (elm); \ + (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_INSERT_BEFORE(listelm, elm, field) \ + do { \ + (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ + (elm)->field.tqe_next = (listelm); \ + *(listelm)->field.tqe_prev = (elm); \ + (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_REMOVE(head, elm, field) \ + do { \ + if (((elm)->field.tqe_next) != TAILQ_END(head)) \ + (elm)->field.tqe_next->field.tqe_prev = (elm)->field.tqe_prev; \ + else \ + (head)->tqh_last = (elm)->field.tqe_prev; \ + *(elm)->field.tqe_prev = (elm)->field.tqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_REPLACE(head, elm, elm2, field) \ + do { \ + if (((elm2)->field.tqe_next = (elm)->field.tqe_next) != TAILQ_END(head)) \ + (elm2)->field.tqe_next->field.tqe_prev = &(elm2)->field.tqe_next; \ + else \ + (head)->tqh_last = &(elm2)->field.tqe_next; \ + (elm2)->field.tqe_prev = (elm)->field.tqe_prev; \ + *(elm2)->field.tqe_prev = (elm2); \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_CONCAT(head1, head2, field) \ + do { \ + if (!TAILQ_EMPTY(head2)) { \ + *(head1)->tqh_last = (head2)->tqh_first; \ + (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \ + (head1)->tqh_last = (head2)->tqh_last; \ + TAILQ_INIT((head2)); \ + } \ + } while (/*CONSTCOND*/ 0) + +/* + * Singly-linked Tail queue declarations. + */ +#define STAILQ_HEAD(name, type) \ + struct name { \ + struct type *stqh_first; /* first element */ \ + struct type **stqh_last; /* addr of last next element */ \ + } + +#define STAILQ_HEAD_INITIALIZER(head) \ + { NULL, &(head).stqh_first } + +#define STAILQ_ENTRY(type) \ + struct { \ + struct type *stqe_next; /* next element */ \ + } + +/* + * Singly-linked Tail queue access methods. + */ +#define STAILQ_FIRST(head) ((head)->stqh_first) +#define STAILQ_END(head) NULL +#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) +#define STAILQ_EMPTY(head) (STAILQ_FIRST(head) == STAILQ_END(head)) + +/* + * Singly-linked Tail queue functions. + */ +#define STAILQ_INIT(head) \ + do { \ + (head)->stqh_first = NULL; \ + (head)->stqh_last = &(head)->stqh_first; \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_INSERT_HEAD(head, elm, field) \ + do { \ + if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \ + (head)->stqh_last = &(elm)->field.stqe_next; \ + (head)->stqh_first = (elm); \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_INSERT_TAIL(head, elm, field) \ + do { \ + (elm)->field.stqe_next = NULL; \ + *(head)->stqh_last = (elm); \ + (head)->stqh_last = &(elm)->field.stqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_INSERT_AFTER(head, listelm, elm, field) \ + do { \ + if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL) \ + (head)->stqh_last = &(elm)->field.stqe_next; \ + (listelm)->field.stqe_next = (elm); \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_REMOVE_HEAD(head, field) \ + do { \ + if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \ + (head)->stqh_last = &(head)->stqh_first; \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_REMOVE(head, elm, type, field) \ + do { \ + if ((head)->stqh_first == (elm)) { \ + STAILQ_REMOVE_HEAD((head), field); \ + } else { \ + struct type *curelm = (head)->stqh_first; \ + while (curelm->field.stqe_next != (elm)) \ + curelm = curelm->field.stqe_next; \ + if ((curelm->field.stqe_next = \ + curelm->field.stqe_next->field.stqe_next) == NULL) \ + (head)->stqh_last = &(curelm)->field.stqe_next; \ + } \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_FOREACH(var, head, field) \ + for ((var) = ((head)->stqh_first); (var); (var) = ((var)->field.stqe_next)) + +#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ + for ((var) = STAILQ_FIRST((head)); \ + (var) && ((tvar) = STAILQ_NEXT((var), field), 1); (var) = (tvar)) + +#define STAILQ_CONCAT(head1, head2) \ + do { \ + if (!STAILQ_EMPTY((head2))) { \ + *(head1)->stqh_last = (head2)->stqh_first; \ + (head1)->stqh_last = (head2)->stqh_last; \ + STAILQ_INIT((head2)); \ + } \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_LAST(head, type, field) \ + (STAILQ_EMPTY((head)) \ + ? NULL \ + : ((struct type *)(void *)((char *)((head)->stqh_last) - \ + offsetof(struct type, field)))) + +#endif /* !_QUEUE_H_ */ diff --git a/semestr-5/so/lista2/so21_lista_2/include/rio.h b/semestr-5/so/lista2/so21_lista_2/include/rio.h new file mode 100644 index 0000000..bd62723 --- /dev/null +++ b/semestr-5/so/lista2/so21_lista_2/include/rio.h @@ -0,0 +1,27 @@ +#ifndef _RIO_H_ +#define _RIO_H_ + +/* Persistent state for the robust I/O (Rio) package */ +#define RIO_BUFSIZE 8192 + +typedef struct { + int rio_fd; /* Descriptor for this internal buf */ + int rio_cnt; /* Unread bytes in internal buf */ + char *rio_bufptr; /* Next unread byte in internal buf */ + char rio_buf[RIO_BUFSIZE]; /* Internal buffer */ +} rio_t; + +/* Rio (Robust I/O) package */ +ssize_t rio_readn(int fd, void *usrbuf, size_t n); +ssize_t rio_writen(int fd, const void *usrbuf, size_t n); +void rio_readinitb(rio_t *rp, int fd); +ssize_t rio_readnb(rio_t *rp, void *usrbuf, size_t n); +ssize_t rio_readlineb(rio_t *rp, void *usrbuf, size_t maxlen); + +/* Wrappers that exit on failure */ +ssize_t Rio_readn(int fd, void *ptr, size_t nbytes); +void Rio_writen(int fd, const void *usrbuf, size_t n); +ssize_t Rio_readnb(rio_t *rp, void *usrbuf, size_t n); +ssize_t Rio_readlineb(rio_t *rp, void *usrbuf, size_t maxlen); + +#endif /* !_RIO_H_ */ diff --git a/semestr-5/so/lista2/so21_lista_2/include/terminal.h b/semestr-5/so/lista2/so21_lista_2/include/terminal.h new file mode 100644 index 0000000..832358e --- /dev/null +++ b/semestr-5/so/lista2/so21_lista_2/include/terminal.h @@ -0,0 +1,27 @@ +#ifndef _TERMINAL_H_ +#define _TERMINAL_H_ + +int tty_open(void); +void tty_curpos(int fd, int *x, int *y); + +/* https://en.wikipedia.org/wiki/ANSI_escape_code#Terminal_output_sequences */ + +#define ESC "\033" +#define CSI ESC "[" + +#define CUU(n) CSI #n "A" /* Cursor Up */ +#define CUD(n) CSI #n "B" /* Cursor Down */ +#define CUF(n) CSI #n "C" /* Cursor Forward */ +#define CUB(n) CSI #n "D" /* Cursor Back */ +#define CNL(n) CSI #n "E" /* Cursor Next Line */ +#define CPL(n) CSI #n "F" /* Cursor Previous Line */ +#define CHA(n) CSI #n "G" /* Cursor Horizontal Absolute */ +#define CUP(n, m) CSI #n ";" #m "H" /* Cursor Position */ +#define ED(n) CSI #n "J" /* Erase in Display */ +#define EL(n) CSI #n "K" /* Erase in Line */ +#define SU(n) CSI #n "S" /* Scroll Up Scroll */ +#define SD(n) CSI #n "T" /* Scroll Down Scroll */ +#define CPR() CSI "6n" /* Cursor Position Report */ +#define SGR(x) CSI x "m" + +#endif /* !_ANSICODES_H_ */ diff --git a/semestr-5/so/lista2/so21_lista_2/include/tree.h b/semestr-5/so/lista2/so21_lista_2/include/tree.h new file mode 100644 index 0000000..3355bad --- /dev/null +++ b/semestr-5/so/lista2/so21_lista_2/include/tree.h @@ -0,0 +1,735 @@ +/* $NetBSD: tree.h,v 1.20 2013/09/14 13:20:45 joerg Exp $ */ +/* $OpenBSD: tree.h,v 1.13 2011/07/09 00:19:45 pirofti Exp $ */ +/* + * Copyright 2002 Niels Provos + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _TREE_H_ +#define _TREE_H_ + +/* + * This file defines data structures for different types of trees: + * splay trees and red-black trees. + * + * A splay tree is a self-organizing data structure. Every operation + * on the tree causes a splay to happen. The splay moves the requested + * node to the root of the tree and partly rebalances it. + * + * This has the benefit that request locality causes faster lookups as + * the requested nodes move to the top of the tree. On the other hand, + * every lookup causes memory writes. + * + * The Balance Theorem bounds the total access time for m operations + * and n inserts on an initially empty tree as O((m + n)lg n). The + * amortized cost for a sequence of m accesses to a splay tree is O(lg n); + * + * A red-black tree is a binary search tree with the node color as an + * extra attribute. It fulfills a set of conditions: + * - every search path from the root to a leaf consists of the + * same number of black nodes, + * - each red node (except for the root) has a black parent, + * - each leaf node is black. + * + * Every operation on a red-black tree is bounded as O(lg n). + * The maximum height of a red-black tree is 2lg (n+1). + */ + +#define SPLAY_HEAD(name, type) \ + struct name { \ + struct type *sph_root; /* root of the tree */ \ + } + +#define SPLAY_INITIALIZER(root) \ + { NULL } + +#define SPLAY_INIT(root) \ + do { \ + (root)->sph_root = NULL; \ + } while (/*CONSTCOND*/ 0) + +#define SPLAY_ENTRY(type) \ + struct { \ + struct type *spe_left; /* left element */ \ + struct type *spe_right; /* right element */ \ + } + +#define SPLAY_LEFT(elm, field) (elm)->field.spe_left +#define SPLAY_RIGHT(elm, field) (elm)->field.spe_right +#define SPLAY_ROOT(head) (head)->sph_root +#define SPLAY_EMPTY(head) (SPLAY_ROOT(head) == NULL) + +/* SPLAY_ROTATE_{LEFT,RIGHT} expect that tmp hold SPLAY_{RIGHT,LEFT} */ +#define SPLAY_ROTATE_RIGHT(head, tmp, field) \ + do { \ + SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field); \ + SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ + (head)->sph_root = tmp; \ + } while (/*CONSTCOND*/ 0) + +#define SPLAY_ROTATE_LEFT(head, tmp, field) \ + do { \ + SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \ + SPLAY_LEFT(tmp, field) = (head)->sph_root; \ + (head)->sph_root = tmp; \ + } while (/*CONSTCOND*/ 0) + +#define SPLAY_LINKLEFT(head, tmp, field) \ + do { \ + SPLAY_LEFT(tmp, field) = (head)->sph_root; \ + tmp = (head)->sph_root; \ + (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \ + } while (/*CONSTCOND*/ 0) + +#define SPLAY_LINKRIGHT(head, tmp, field) \ + do { \ + SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ + tmp = (head)->sph_root; \ + (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \ + } while (/*CONSTCOND*/ 0) + +#define SPLAY_ASSEMBLE(head, node, left, right, field) \ + do { \ + SPLAY_RIGHT(left, field) = SPLAY_LEFT((head)->sph_root, field); \ + SPLAY_LEFT(right, field) = SPLAY_RIGHT((head)->sph_root, field); \ + SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(node, field); \ + SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(node, field); \ + } while (/*CONSTCOND*/ 0) + +/* Generates prototypes and inline functions */ + +#define SPLAY_PROTOTYPE(name, type, field, cmp) \ + void name##_SPLAY(struct name *, struct type *); \ + void name##_SPLAY_MINMAX(struct name *, int); \ + struct type *name##_SPLAY_INSERT(struct name *, struct type *); \ + struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \ + \ + /* Finds the node with the same key as elm */ \ + static __inline struct type *name##_SPLAY_FIND(struct name *head, \ + struct type *elm) { \ + if (SPLAY_EMPTY(head)) \ + return (NULL); \ + name##_SPLAY(head, elm); \ + if ((cmp)(elm, (head)->sph_root) == 0) \ + return (head->sph_root); \ + return (NULL); \ + } \ + \ + static __inline __unused struct type *name##_SPLAY_NEXT(struct name *head, \ + struct type *elm) { \ + name##_SPLAY(head, elm); \ + if (SPLAY_RIGHT(elm, field) != NULL) { \ + elm = SPLAY_RIGHT(elm, field); \ + while (SPLAY_LEFT(elm, field) != NULL) { \ + elm = SPLAY_LEFT(elm, field); \ + } \ + } else \ + elm = NULL; \ + return (elm); \ + } \ + \ + static __unused __inline struct type *name##_SPLAY_MIN_MAX( \ + struct name *head, int val) { \ + name##_SPLAY_MINMAX(head, val); \ + return (SPLAY_ROOT(head)); \ + } + +/* Main splay operation. + * Moves node close to the key of elm to top + */ +#define SPLAY_GENERATE(name, type, field, cmp) \ + struct type *name##_SPLAY_INSERT(struct name *head, struct type *elm) { \ + if (SPLAY_EMPTY(head)) { \ + SPLAY_LEFT(elm, field) = SPLAY_RIGHT(elm, field) = NULL; \ + } else { \ + int __comp; \ + name##_SPLAY(head, elm); \ + __comp = (cmp)(elm, (head)->sph_root); \ + if (__comp < 0) { \ + SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field); \ + SPLAY_RIGHT(elm, field) = (head)->sph_root; \ + SPLAY_LEFT((head)->sph_root, field) = NULL; \ + } else if (__comp > 0) { \ + SPLAY_RIGHT(elm, field) = SPLAY_RIGHT((head)->sph_root, field); \ + SPLAY_LEFT(elm, field) = (head)->sph_root; \ + SPLAY_RIGHT((head)->sph_root, field) = NULL; \ + } else \ + return ((head)->sph_root); \ + } \ + (head)->sph_root = (elm); \ + return (NULL); \ + } \ + \ + struct type *name##_SPLAY_REMOVE(struct name *head, struct type *elm) { \ + struct type *__tmp; \ + if (SPLAY_EMPTY(head)) \ + return (NULL); \ + name##_SPLAY(head, elm); \ + if ((cmp)(elm, (head)->sph_root) == 0) { \ + if (SPLAY_LEFT((head)->sph_root, field) == NULL) { \ + (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \ + } else { \ + __tmp = SPLAY_RIGHT((head)->sph_root, field); \ + (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \ + name##_SPLAY(head, elm); \ + SPLAY_RIGHT((head)->sph_root, field) = __tmp; \ + } \ + return (elm); \ + } \ + return (NULL); \ + } \ + \ + void name##_SPLAY(struct name *head, struct type *elm) { \ + struct type __node, *__left, *__right, *__tmp; \ + int __comp; \ + \ + SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL; \ + __left = __right = &__node; \ + \ + while ((__comp = (cmp)(elm, (head)->sph_root)) != 0) { \ + if (__comp < 0) { \ + __tmp = SPLAY_LEFT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if ((cmp)(elm, __tmp) < 0) { \ + SPLAY_ROTATE_RIGHT(head, __tmp, field); \ + if (SPLAY_LEFT((head)->sph_root, field) == NULL) \ + break; \ + } \ + SPLAY_LINKLEFT(head, __right, field); \ + } else if (__comp > 0) { \ + __tmp = SPLAY_RIGHT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if ((cmp)(elm, __tmp) > 0) { \ + SPLAY_ROTATE_LEFT(head, __tmp, field); \ + if (SPLAY_RIGHT((head)->sph_root, field) == NULL) \ + break; \ + } \ + SPLAY_LINKRIGHT(head, __left, field); \ + } \ + } \ + SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ + } \ + \ + /* Splay with either the minimum or the maximum element \ + * Used to find minimum or maximum element in tree. \ + */ \ + void name##_SPLAY_MINMAX(struct name *head, int __comp) { \ + struct type __node, *__left, *__right, *__tmp; \ + \ + SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL; \ + __left = __right = &__node; \ + \ + while (1) { \ + if (__comp < 0) { \ + __tmp = SPLAY_LEFT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if (__comp < 0) { \ + SPLAY_ROTATE_RIGHT(head, __tmp, field); \ + if (SPLAY_LEFT((head)->sph_root, field) == NULL) \ + break; \ + } \ + SPLAY_LINKLEFT(head, __right, field); \ + } else if (__comp > 0) { \ + __tmp = SPLAY_RIGHT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if (__comp > 0) { \ + SPLAY_ROTATE_LEFT(head, __tmp, field); \ + if (SPLAY_RIGHT((head)->sph_root, field) == NULL) \ + break; \ + } \ + SPLAY_LINKRIGHT(head, __left, field); \ + } \ + } \ + SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ + } + +#define SPLAY_NEGINF -1 +#define SPLAY_INF 1 + +#define SPLAY_INSERT(name, x, y) name##_SPLAY_INSERT(x, y) +#define SPLAY_REMOVE(name, x, y) name##_SPLAY_REMOVE(x, y) +#define SPLAY_FIND(name, x, y) name##_SPLAY_FIND(x, y) +#define SPLAY_NEXT(name, x, y) name##_SPLAY_NEXT(x, y) +#define SPLAY_MIN(name, x) \ + (SPLAY_EMPTY(x) ? NULL : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF)) +#define SPLAY_MAX(name, x) \ + (SPLAY_EMPTY(x) ? NULL : name##_SPLAY_MIN_MAX(x, SPLAY_INF)) + +#define SPLAY_FOREACH(x, name, head) \ + for ((x) = SPLAY_MIN(name, head); (x) != NULL; \ + (x) = SPLAY_NEXT(name, head, x)) + +/* Macros that define a red-black tree */ +#define RB_HEAD(name, type) \ + struct name { \ + struct type *rbh_root; /* root of the tree */ \ + } + +#define RB_INITIALIZER(root) \ + { NULL } + +#define RB_INIT(root) \ + do { \ + (root)->rbh_root = NULL; \ + } while (/*CONSTCOND*/ 0) + +#define RB_BLACK 0 +#define RB_RED 1 +#define RB_ENTRY(type) \ + struct { \ + struct type *rbe_left; /* left element */ \ + struct type *rbe_right; /* right element */ \ + struct type *rbe_parent; /* parent element */ \ + int rbe_color; /* node color */ \ + } + +#define RB_LEFT(elm, field) (elm)->field.rbe_left +#define RB_RIGHT(elm, field) (elm)->field.rbe_right +#define RB_PARENT(elm, field) (elm)->field.rbe_parent +#define RB_COLOR(elm, field) (elm)->field.rbe_color +#define RB_ROOT(head) (head)->rbh_root +#define RB_EMPTY(head) (RB_ROOT(head) == NULL) + +#define RB_SET(elm, parent, field) \ + do { \ + RB_PARENT(elm, field) = parent; \ + RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL; \ + RB_COLOR(elm, field) = RB_RED; \ + } while (/*CONSTCOND*/ 0) + +#define RB_SET_BLACKRED(black, red, field) \ + do { \ + RB_COLOR(black, field) = RB_BLACK; \ + RB_COLOR(red, field) = RB_RED; \ + } while (/*CONSTCOND*/ 0) + +#ifndef RB_AUGMENT +#define RB_AUGMENT(x) \ + do { \ + } while (/*CONSTCOND*/ 0) +#endif + +#define RB_ROTATE_LEFT(head, elm, tmp, field) \ + do { \ + (tmp) = RB_RIGHT(elm, field); \ + if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field)) != NULL) { \ + RB_PARENT(RB_LEFT(tmp, field), field) = (elm); \ + } \ + RB_AUGMENT(elm); \ + if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \ + if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ + RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ + else \ + RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ + } else \ + (head)->rbh_root = (tmp); \ + RB_LEFT(tmp, field) = (elm); \ + RB_PARENT(elm, field) = (tmp); \ + RB_AUGMENT(tmp); \ + if ((RB_PARENT(tmp, field))) \ + RB_AUGMENT(RB_PARENT(tmp, field)); \ + } while (/*CONSTCOND*/ 0) + +#define RB_ROTATE_RIGHT(head, elm, tmp, field) \ + do { \ + (tmp) = RB_LEFT(elm, field); \ + if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field)) != NULL) { \ + RB_PARENT(RB_RIGHT(tmp, field), field) = (elm); \ + } \ + RB_AUGMENT(elm); \ + if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \ + if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ + RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ + else \ + RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ + } else \ + (head)->rbh_root = (tmp); \ + RB_RIGHT(tmp, field) = (elm); \ + RB_PARENT(elm, field) = (tmp); \ + RB_AUGMENT(tmp); \ + if ((RB_PARENT(tmp, field))) \ + RB_AUGMENT(RB_PARENT(tmp, field)); \ + } while (/*CONSTCOND*/ 0) + +/* Generates prototypes and inline functions */ +#define RB_PROTOTYPE(name, type, field, cmp) \ + RB_PROTOTYPE_INTERNAL(name, type, field, cmp, ) +#define RB_PROTOTYPE_STATIC(name, type, field, cmp) \ + RB_PROTOTYPE_INTERNAL(name, type, field, cmp, __unused static) +#define RB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr) \ + attr void name##_RB_INSERT_COLOR(struct name *, struct type *); \ + attr void name##_RB_REMOVE_COLOR(struct name *, struct type *, \ + struct type *); \ + attr struct type *name##_RB_REMOVE(struct name *, struct type *); \ + attr struct type *name##_RB_INSERT(struct name *, struct type *); \ + attr struct type *name##_RB_FIND(struct name *, struct type *); \ + attr struct type *name##_RB_NFIND(struct name *, struct type *); \ + attr struct type *name##_RB_NEXT(struct type *); \ + attr struct type *name##_RB_PREV(struct type *); \ + attr struct type *name##_RB_MINMAX(struct name *, int); + +/* Main rb operation. + * Moves node close to the key of elm to top + */ +#define RB_GENERATE(name, type, field, cmp) \ + RB_GENERATE_INTERNAL(name, type, field, cmp, ) +#define RB_GENERATE_STATIC(name, type, field, cmp) \ + RB_GENERATE_INTERNAL(name, type, field, cmp, __unused static) +#define RB_GENERATE_INTERNAL(name, type, field, cmp, attr) \ + attr void name##_RB_INSERT_COLOR(struct name *head, struct type *elm) { \ + struct type *parent, *gparent, *tmp; \ + while ((parent = RB_PARENT(elm, field)) != NULL && \ + RB_COLOR(parent, field) == RB_RED) { \ + gparent = RB_PARENT(parent, field); \ + if (parent == RB_LEFT(gparent, field)) { \ + tmp = RB_RIGHT(gparent, field); \ + if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ + RB_COLOR(tmp, field) = RB_BLACK; \ + RB_SET_BLACKRED(parent, gparent, field); \ + elm = gparent; \ + continue; \ + } \ + if (RB_RIGHT(parent, field) == elm) { \ + RB_ROTATE_LEFT(head, parent, tmp, field); \ + tmp = parent; \ + parent = elm; \ + elm = tmp; \ + } \ + RB_SET_BLACKRED(parent, gparent, field); \ + RB_ROTATE_RIGHT(head, gparent, tmp, field); \ + } else { \ + tmp = RB_LEFT(gparent, field); \ + if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ + RB_COLOR(tmp, field) = RB_BLACK; \ + RB_SET_BLACKRED(parent, gparent, field); \ + elm = gparent; \ + continue; \ + } \ + if (RB_LEFT(parent, field) == elm) { \ + RB_ROTATE_RIGHT(head, parent, tmp, field); \ + tmp = parent; \ + parent = elm; \ + elm = tmp; \ + } \ + RB_SET_BLACKRED(parent, gparent, field); \ + RB_ROTATE_LEFT(head, gparent, tmp, field); \ + } \ + } \ + RB_COLOR(head->rbh_root, field) = RB_BLACK; \ + } \ + \ + attr void name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, \ + struct type *elm) { \ + struct type *tmp; \ + while ((elm == NULL || RB_COLOR(elm, field) == RB_BLACK) && \ + elm != RB_ROOT(head)) { \ + if (RB_LEFT(parent, field) == elm) { \ + tmp = RB_RIGHT(parent, field); \ + if (RB_COLOR(tmp, field) == RB_RED) { \ + RB_SET_BLACKRED(tmp, parent, field); \ + RB_ROTATE_LEFT(head, parent, tmp, field); \ + tmp = RB_RIGHT(parent, field); \ + } \ + if ((RB_LEFT(tmp, field) == NULL || \ + RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) && \ + (RB_RIGHT(tmp, field) == NULL || \ + RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) { \ + RB_COLOR(tmp, field) = RB_RED; \ + elm = parent; \ + parent = RB_PARENT(elm, field); \ + } else { \ + if (RB_RIGHT(tmp, field) == NULL || \ + RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK) { \ + struct type *oleft; \ + if ((oleft = RB_LEFT(tmp, field)) != NULL) \ + RB_COLOR(oleft, field) = RB_BLACK; \ + RB_COLOR(tmp, field) = RB_RED; \ + RB_ROTATE_RIGHT(head, tmp, oleft, field); \ + tmp = RB_RIGHT(parent, field); \ + } \ + RB_COLOR(tmp, field) = RB_COLOR(parent, field); \ + RB_COLOR(parent, field) = RB_BLACK; \ + if (RB_RIGHT(tmp, field)) \ + RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK; \ + RB_ROTATE_LEFT(head, parent, tmp, field); \ + elm = RB_ROOT(head); \ + break; \ + } \ + } else { \ + tmp = RB_LEFT(parent, field); \ + if (RB_COLOR(tmp, field) == RB_RED) { \ + RB_SET_BLACKRED(tmp, parent, field); \ + RB_ROTATE_RIGHT(head, parent, tmp, field); \ + tmp = RB_LEFT(parent, field); \ + } \ + if ((RB_LEFT(tmp, field) == NULL || \ + RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) && \ + (RB_RIGHT(tmp, field) == NULL || \ + RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) { \ + RB_COLOR(tmp, field) = RB_RED; \ + elm = parent; \ + parent = RB_PARENT(elm, field); \ + } else { \ + if (RB_LEFT(tmp, field) == NULL || \ + RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) { \ + struct type *oright; \ + if ((oright = RB_RIGHT(tmp, field)) != NULL) \ + RB_COLOR(oright, field) = RB_BLACK; \ + RB_COLOR(tmp, field) = RB_RED; \ + RB_ROTATE_LEFT(head, tmp, oright, field); \ + tmp = RB_LEFT(parent, field); \ + } \ + RB_COLOR(tmp, field) = RB_COLOR(parent, field); \ + RB_COLOR(parent, field) = RB_BLACK; \ + if (RB_LEFT(tmp, field)) \ + RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK; \ + RB_ROTATE_RIGHT(head, parent, tmp, field); \ + elm = RB_ROOT(head); \ + break; \ + } \ + } \ + } \ + if (elm) \ + RB_COLOR(elm, field) = RB_BLACK; \ + } \ + \ + attr struct type *name##_RB_REMOVE(struct name *head, struct type *elm) { \ + struct type *child, *parent, *old = elm; \ + int color; \ + if (RB_LEFT(elm, field) == NULL) \ + child = RB_RIGHT(elm, field); \ + else if (RB_RIGHT(elm, field) == NULL) \ + child = RB_LEFT(elm, field); \ + else { \ + struct type *left; \ + elm = RB_RIGHT(elm, field); \ + while ((left = RB_LEFT(elm, field)) != NULL) \ + elm = left; \ + child = RB_RIGHT(elm, field); \ + parent = RB_PARENT(elm, field); \ + color = RB_COLOR(elm, field); \ + if (child) \ + RB_PARENT(child, field) = parent; \ + if (parent) { \ + if (RB_LEFT(parent, field) == elm) \ + RB_LEFT(parent, field) = child; \ + else \ + RB_RIGHT(parent, field) = child; \ + RB_AUGMENT(parent); \ + } else \ + RB_ROOT(head) = child; \ + if (RB_PARENT(elm, field) == old) \ + parent = elm; \ + (elm)->field = (old)->field; \ + if (RB_PARENT(old, field)) { \ + if (RB_LEFT(RB_PARENT(old, field), field) == old) \ + RB_LEFT(RB_PARENT(old, field), field) = elm; \ + else \ + RB_RIGHT(RB_PARENT(old, field), field) = elm; \ + RB_AUGMENT(RB_PARENT(old, field)); \ + } else \ + RB_ROOT(head) = elm; \ + RB_PARENT(RB_LEFT(old, field), field) = elm; \ + if (RB_RIGHT(old, field)) \ + RB_PARENT(RB_RIGHT(old, field), field) = elm; \ + if (parent) { \ + left = parent; \ + do { \ + RB_AUGMENT(left); \ + } while ((left = RB_PARENT(left, field)) != NULL); \ + } \ + goto color; \ + } \ + parent = RB_PARENT(elm, field); \ + color = RB_COLOR(elm, field); \ + if (child) \ + RB_PARENT(child, field) = parent; \ + if (parent) { \ + if (RB_LEFT(parent, field) == elm) \ + RB_LEFT(parent, field) = child; \ + else \ + RB_RIGHT(parent, field) = child; \ + RB_AUGMENT(parent); \ + } else \ + RB_ROOT(head) = child; \ + color: \ + if (color == RB_BLACK) \ + name##_RB_REMOVE_COLOR(head, parent, child); \ + return (old); \ + } \ + \ + /* Inserts a node into the RB tree */ \ + attr struct type *name##_RB_INSERT(struct name *head, struct type *elm) { \ + struct type *tmp; \ + struct type *parent = NULL; \ + int comp = 0; \ + tmp = RB_ROOT(head); \ + while (tmp) { \ + parent = tmp; \ + comp = (cmp)(elm, parent); \ + if (comp < 0) \ + tmp = RB_LEFT(tmp, field); \ + else if (comp > 0) \ + tmp = RB_RIGHT(tmp, field); \ + else \ + return (tmp); \ + } \ + RB_SET(elm, parent, field); \ + if (parent != NULL) { \ + if (comp < 0) \ + RB_LEFT(parent, field) = elm; \ + else \ + RB_RIGHT(parent, field) = elm; \ + RB_AUGMENT(parent); \ + } else \ + RB_ROOT(head) = elm; \ + name##_RB_INSERT_COLOR(head, elm); \ + return (NULL); \ + } \ + \ + /* Finds the node with the same key as elm */ \ + attr struct type *name##_RB_FIND(struct name *head, struct type *elm) { \ + struct type *tmp = RB_ROOT(head); \ + int comp; \ + while (tmp) { \ + comp = cmp(elm, tmp); \ + if (comp < 0) \ + tmp = RB_LEFT(tmp, field); \ + else if (comp > 0) \ + tmp = RB_RIGHT(tmp, field); \ + else \ + return (tmp); \ + } \ + return (NULL); \ + } \ + \ + /* Finds the first node greater than or equal to the search key */ \ + attr struct type *name##_RB_NFIND(struct name *head, struct type *elm) { \ + struct type *tmp = RB_ROOT(head); \ + struct type *res = NULL; \ + int comp; \ + while (tmp) { \ + comp = cmp(elm, tmp); \ + if (comp < 0) { \ + res = tmp; \ + tmp = RB_LEFT(tmp, field); \ + } else if (comp > 0) \ + tmp = RB_RIGHT(tmp, field); \ + else \ + return (tmp); \ + } \ + return (res); \ + } \ + \ + /* ARGSUSED */ \ + attr struct type *name##_RB_NEXT(struct type *elm) { \ + if (RB_RIGHT(elm, field)) { \ + elm = RB_RIGHT(elm, field); \ + while (RB_LEFT(elm, field)) \ + elm = RB_LEFT(elm, field); \ + } else { \ + if (RB_PARENT(elm, field) && \ + (elm == RB_LEFT(RB_PARENT(elm, field), field))) \ + elm = RB_PARENT(elm, field); \ + else { \ + while (RB_PARENT(elm, field) && \ + (elm == RB_RIGHT(RB_PARENT(elm, field), field))) \ + elm = RB_PARENT(elm, field); \ + elm = RB_PARENT(elm, field); \ + } \ + } \ + return (elm); \ + } \ + \ + /* ARGSUSED */ \ + attr struct type *name##_RB_PREV(struct type *elm) { \ + if (RB_LEFT(elm, field)) { \ + elm = RB_LEFT(elm, field); \ + while (RB_RIGHT(elm, field)) \ + elm = RB_RIGHT(elm, field); \ + } else { \ + if (RB_PARENT(elm, field) && \ + (elm == RB_RIGHT(RB_PARENT(elm, field), field))) \ + elm = RB_PARENT(elm, field); \ + else { \ + while (RB_PARENT(elm, field) && \ + (elm == RB_LEFT(RB_PARENT(elm, field), field))) \ + elm = RB_PARENT(elm, field); \ + elm = RB_PARENT(elm, field); \ + } \ + } \ + return (elm); \ + } \ + \ + attr struct type *name##_RB_MINMAX(struct name *head, int val) { \ + struct type *tmp = RB_ROOT(head); \ + struct type *parent = NULL; \ + while (tmp) { \ + parent = tmp; \ + if (val < 0) \ + tmp = RB_LEFT(tmp, field); \ + else \ + tmp = RB_RIGHT(tmp, field); \ + } \ + return (parent); \ + } + +#define RB_NEGINF -1 +#define RB_INF 1 + +#define RB_INSERT(name, x, y) CONCAT(name,_RB_INSERT(x, y)) +#define RB_REMOVE(name, x, y) CONCAT(name,_RB_REMOVE(x, y)) +#define RB_FIND(name, x, y) CONCAT(name,_RB_FIND(x, y)) +#define RB_NFIND(name, x, y) CONCAT(name,_RB_NFIND(x, y)) +#define RB_NEXT(name, x, y) CONCAT(name,_RB_NEXT(y)) +#define RB_PREV(name, x, y) CONCAT(name,_RB_PREV(y)) +#define RB_MIN(name, x) CONCAT(name,_RB_MINMAX(x, RB_NEGINF)) +#define RB_MAX(name, x) CONCAT(name,_RB_MINMAX(x, RB_INF)) + +#define RB_FOREACH(x, name, head) \ + for ((x) = RB_MIN(name, head); (x) != NULL; (x) = name##_RB_NEXT(x)) + +#define RB_FOREACH_FROM(x, name, y) \ + for ((x) = (y); ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); \ + (x) = (y)) + +#define RB_FOREACH_SAFE(x, name, head, y) \ + for ((x) = RB_MIN(name, head); \ + ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); (x) = (y)) + +#define RB_FOREACH_REVERSE(x, name, head) \ + for ((x) = RB_MAX(name, head); (x) != NULL; (x) = name##_RB_PREV(x)) + +#define RB_FOREACH_REVERSE_FROM(x, name, y) \ + for ((x) = (y); ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \ + (x) = (y)) + +#define RB_FOREACH_REVERSE_SAFE(x, name, head, y) \ + for ((x) = RB_MAX(name, head); \ + ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); (x) = (y)) + +#endif /* !_TREE_H_ */ diff --git a/semestr-5/so/lista2/so21_lista_2/reaper.c b/semestr-5/so/lista2/so21_lista_2/reaper.c new file mode 100644 index 0000000..da43a2f --- /dev/null +++ b/semestr-5/so/lista2/so21_lista_2/reaper.c @@ -0,0 +1,59 @@ +#include "csapp.h" + +static pid_t spawn(void (*fn)(void)) { + pid_t pid = Fork(); + if (pid == 0) { + fn(); + printf("(%d) I'm done!\n", getpid()); + exit(EXIT_SUCCESS); + } + return pid; +} + +static void grandchild(void) { + printf("(%d) Waiting for signal!\n", getpid()); + pause(); + printf("(%d) Got the signal!\n", getpid()); +} + +static void child(void) { + pid_t pid; + setpgid(0, 0); + pid = spawn(grandchild); + printf("(%d) Grandchild (%d) spawned!\n", getpid(), pid); +} + +/* Runs command "ps -o pid,ppid,pgrp,stat,cmd" using execve(2). */ +static void ps(void) { + pid_t pid = Fork(); + if (pid == 0) { + if (execlp("ps", "ps", "-o", "pid,ppid,pgrp,stat,cmd", NULL) < 0) { + fprintf(stderr, "Exec error: %s\n", strerror(errno)); + exit(EXIT_FAILURE); + } + } + waitpid(pid, NULL, 0); +} + +int main(void) { + /* TODO: Make yourself a reaper. */ +#ifdef LINUX + Prctl(PR_SET_CHILD_SUBREAPER, 1); +#endif + printf("(%d) I'm a reaper now!\n", getpid()); + + pid_t pid, pgrp; + int status; + + /* TODO: Start child and grandchild, then kill child! + * Remember that you need to kill all subprocesses before quit. */ + pid = spawn(child); + pgrp = pid; + waitpid(pid, &status, 0); + ps(); + + Kill(-pgrp, SIGINT); + pid = wait(&status); + printf("Reaped the grandchild (%d), exit code: %d\n", pid, status); + return EXIT_SUCCESS; +} diff --git a/semestr-5/so/lista2/test.c b/semestr-5/so/lista2/test.c new file mode 100644 index 0000000..64e4166 --- /dev/null +++ b/semestr-5/so/lista2/test.c @@ -0,0 +1,33 @@ +#include +#include +#include +#include + +static void signal_handler(int signum) { + if (signum == SIGINT) { + write(STDOUT_FILENO, "XD\n", 3); + _exit(0); + } +} + + +int main() { + signal(SIGINT, signal_handler); + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGINT); + // sigfillset(&mask); + // sigdelset(&mask, SIGINT); + // sigprocmask(SIG_BLOCK, &mask, NULL); + // // int *p = NULL; + // // sleep(10); + // // *p = 1; + // // pause(); + // // abort(); + // _exit(0); + // printf("Lmao\n"); + // while(1) {} + int sig; + sigwait(&mask, &sig); + printf("sig: %d\n", sig); +} \ No newline at end of file diff --git a/semestr-5/so/lista3/so21_lista_3/Makefile.include b/semestr-5/so/lista3/so21_lista_3/Makefile.include new file mode 100644 index 0000000..196c9a5 --- /dev/null +++ b/semestr-5/so/lista3/so21_lista_3/Makefile.include @@ -0,0 +1,105 @@ +CC = gcc -g +CFLAGS = -Og -Wall -Werror -Wstrict-prototypes +AS = as -g +ASFLAGS = +CPPFLAGS = -Iinclude +LDLIBS = -Llibcsapp -lcsapp +SED = sed + +# Recognize operating system +ifeq ($(shell uname -s), Darwin) +CPPFLAGS += -DMACOS +SED = gsed +endif + +ifeq ($(shell uname -s), Linux) +CPPFLAGS += -DLINUX +endif + +ifeq ($(shell uname -s), FreeBSD) +CPPFLAGS += -DFREEBSD +endif + +# Pass "VERBOSE=1" at command line to display command being invoked by GNU Make +ifneq ($(VERBOSE), 1) +.SILENT: +endif + +LIBSRC_C = $(wildcard libcsapp/*.c) +LIBSRC_S = $(wildcard libcsapp/*.s) +LIBSRC_H = $(wildcard include/*.h) +LIBSRCS = $(LIBSRC_C) $(LIBSRC_S) $(LIBSRC_H) +LIBOBJS = $(LIBSRC_C:%.c=%.o) +ifneq ($(shell uname -s), Darwin) +LIBOBJS += $(LIBSRC_S:%.s=%.o) +endif +LIB = libcsapp/libcsapp.a + +SRC_C = $(wildcard *.c) +SRC_S = $(wildcard *.s) +SRC_H = $(wildcard *.h) +SRCS = $(SRC_C) $(SRC_S) +OBJS = $(SRC_C:%.c=%.o) + +SOURCES = $(SRCS) $(LIBSRCS) +OBJECTS = $(OBJS) $(LIBOBJS) +DEPFILES = $(foreach f,$(SRC_C) $(LIBSRC_C),\ + $(dir $(f))$(patsubst %.c,.%.d,$(notdir $(f)))) + +ARCHIVE = so$(shell date +'%y')_$(shell basename $(PWD)) +FILES = Makefile Makefile.include $(EXTRA-FILES) + +all: $(DEPFILES) $(LIB) $(PROGS) + +$(LIB): $(LIBOBJS) + +# Generate dependencies automatically +ifeq ($(words $(findstring $(MAKECMDGOALS), archive clean)), 0) + -include $(DEPFILES) +endif + +# Disable all built-in recipes and define our own +.SUFFIXES: + +.%.d: %.c + $(CC) $(CPPFLAGS) -MM -MG -o $@ $< + +%.o: %.c .%.d + @echo "[CC] $@ <- $<" + $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< + +%.o: %.s + @echo "[AS] $@ <- $<" + $(AS) $(ASFLAGS) -c -o $@ $< + +%.a: + @echo "[AR] $@ <- $^" + $(AR) rc $@ $^ + +%: %.o $(LIB) + @echo "[LD] $@ <- $^" + $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) + +clean: + rm -vf $(PROGS) $(OBJECTS) $(DEPFILES) $(LIB) + rm -vf $(shell find -L . -iname '*~') + rm -vf $(ARCHIVE).tar.gz + rm -vrf $(EXTRA-CLEAN) *.dSYM + +format: + clang-format --style=file -i $(LIBSRC_C) $(LIBSRC_H) $(SRC_C) $(SRC_H) + +archive: clean + mkdir -p $(ARCHIVE) $(ARCHIVE)/libcsapp $(ARCHIVE)/include + cp -L $(SRCS) $(SRC_H) $(FILES) $(ARCHIVE)/ + cp -L $(LIBSRCS) $(ARCHIVE)/libcsapp/ + cp -L $(LIBSRC_H) $(ARCHIVE)/include/ + for f in $(SRCS:%=$(ARCHIVE)/%); do \ + $(SED) --in-place='' -e '/^#if.*STUDENT/,/^#endif.*STUDENT/d' $$f; \ + done + tar cvzhf $(ARCHIVE).tar.gz $(ARCHIVE) + rm -rf $(ARCHIVE) + +.PHONY: all clean format archive + +# vim: ts=8 sw=8 noet diff --git a/semestr-5/so/lista3/so21_lista_3/coro.c b/semestr-5/so/lista3/so21_lista_3/coro.c new file mode 100644 index 0000000..92cc199 --- /dev/null +++ b/semestr-5/so/lista3/so21_lista_3/coro.c @@ -0,0 +1,176 @@ +#include "queue.h" +#include "csapp.h" + +#define CORO_STKSIZE 4096 +#define CORO_STKALIGN 16 /* As required by SysV ABI ! */ + +#ifndef EOF +#define EOF (-1) +#endif + +#ifndef NOTHING +#define NOTHING (-2) +#endif + +typedef struct coro { + TAILQ_ENTRY(coro) co_link; + const char *co_name; + void *co_stack; + Jmpbuf co_ctx; +} coro_t; + +static TAILQ_HEAD(, coro) runqueue = TAILQ_HEAD_INITIALIZER(runqueue); +static coro_t *running; +static Jmpbuf dispatcher; + +/* Initialize coroutine stucture with stack. */ +static void coro_init(coro_t *co, const char *name) { + memset(co, 0, sizeof(coro_t)); + co->co_name = name; + /* Allocates a fresh stack for the coroutine! */ + if (posix_memalign(&co->co_stack, CORO_STKALIGN, CORO_STKSIZE) < 0) + unix_error("posix_memalign error"); +} + +/* Detach a stack from coroutine structure. */ +static void coro_destroy(coro_t *co) { + free(co->co_stack); +} + +/* + * Switch between subsequent coroutines. + * + * Dead coroutines, i.e. ones that returned EOF, get removed from the run queue. + * Feed next coroutine (value returned from coro_yield) with the result from + * previous one (parameter passed to coro_yield). + * Return to dispatcher if there're no more coroutines to run. + */ +static noreturn void coro_switch(int v) { + coro_t *curr = running; + /* TODO: Use description above to implement the body. */ + + curr = TAILQ_NEXT(curr, co_link); + if (v == EOF) { + TAILQ_REMOVE(&runqueue, running, co_link); + } + + if (TAILQ_EMPTY(&runqueue)) { + Longjmp(dispatcher, 1); + } + + if (curr) { + running = curr; + Longjmp(running->co_ctx, v); + } else { + running = TAILQ_FIRST(&runqueue); + Longjmp(running->co_ctx, NOTHING); + } + +} + +/* Save caller context and switch back to next coroutine. */ +static int coro_yield(int v) { + int nv = Setjmp(running->co_ctx); + if (nv == 0) + coro_switch(v); + return nv; +} + +/* Configure coroutine context to be executed. */ +static void coro_add(coro_t *co, void (*fn)(int)) { + int v = Setjmp(co->co_ctx); + if (v) { + /* This will get executed when coroutine is entered first time. */ + fn(v); + /* Coroutine must pass EOF to be removed from runqueue! */ + coro_switch(EOF); + } + /* Coroutine will be running on its private stack! */ + co->co_ctx->rsp = co->co_stack + CORO_STKSIZE; + TAILQ_INSERT_TAIL(&runqueue, co, co_link); +} + +/* Take first coroutine and feed it with passed value. */ +static int coro_run(int v) { + running = TAILQ_FIRST(&runqueue); + int nv = Setjmp(dispatcher); + if (nv == 0) + Longjmp(running->co_ctx, v); + return nv; +} + +/* + * Actual coroutines that perform some useful work. + */ + +static void func_1(int _) { + int words = 0; + char prev_ch = ' '; + char ch; + + while (Read(0, &ch, 1) > 0) { + if (isspace(ch)) { + if (isspace(prev_ch)) + continue; + words++; + } + coro_yield(ch); + prev_ch = ch; + } + + if (!isspace(ch)) + words++; + + dprintf(STDERR_FILENO, "\nfunc_1: words = %d\n", words); +} + +static void func_2(int ch) { + int removed = 0; + + while (ch != EOF) { + if (!isalpha(ch)) { + removed++; + ch = NOTHING; + } + ch = coro_yield(ch); + } + + dprintf(STDERR_FILENO, "func_2: removed = %d\n", removed); +} + +static void func_3(int ch) { + int printed = 0; + + while (ch != EOF) { + if (ch != NOTHING) { + printed++; + if (islower(ch)) + ch = toupper(ch); + else if (isupper(ch)) + ch = tolower(ch); + Write(STDOUT_FILENO, &ch, 1); + } + ch = coro_yield(NOTHING); + } + + dprintf(STDERR_FILENO, "func_3: printed = %d\n", printed); +} + +int main(void) { + coro_t co[3]; + + coro_init(&co[0], "func_1"); + coro_init(&co[1], "func_2"); + coro_init(&co[2], "func_3"); + coro_add(&co[0], func_1); + coro_add(&co[1], func_2); + coro_add(&co[2], func_3); + coro_run(NOTHING); + coro_destroy(&co[0]); + coro_destroy(&co[1]); + coro_destroy(&co[2]); + + dprintf(STDERR_FILENO, "Bye, bye!\n"); + + return EXIT_SUCCESS; +} diff --git a/semestr-5/so/lista3/so21_lista_3/game.c b/semestr-5/so/lista3/so21_lista_3/game.c new file mode 100644 index 0000000..87f8ef5 --- /dev/null +++ b/semestr-5/so/lista3/so21_lista_3/game.c @@ -0,0 +1,118 @@ +#include "csapp.h" +#include "terminal.h" +#include +#include + +#undef MAXLINE +#define MAXLINE 120 + +static sigjmp_buf env; + +static void signal_handler(int signo) { + siglongjmp(env, signo); +} + +/* If interrupted by signal, returns signal number. Otherwise converts user + * provided string to number and saves it under num_p and returns zero. */ +static int readnum(int *num_p) { + char line[MAXLINE]; + int n; + /* TODO: Something is missing here! Use Read() to get line from user. */ + volatile static int ret_val; + ret_val = sigsetjmp(env, 1); + if (ret_val != 0) return ret_val; + + alarm(1); + n = Read(STDIN_FILENO, line, MAXLINE - 1); + + alarm(0); + line[n] = 0; + *num_p = atoi(line); + return 0; +} + +static void game(void) { + int tty = tty_open(); + + int timeout = 0, num1 = 0, num2 = 0, sum; + int last_sig = 0; + int lives = 3; + int score = 0; + + while (lives > 0) { + switch (last_sig) { + case 0: + timeout = 5; + num1 = random() % 100; + num2 = random() % 100; + printf("What is the sum of %d and %d?\n", num1, num2); + break; + + case SIGINT: + printf(CHA(1) EL() "Bye bye!\n"); + exit(EXIT_FAILURE); + + case SIGALRM: + timeout--; + if (timeout < 0) { + last_sig = 0; + lives--; + printf(CHA(1) EL() "Answer was %d!\n", num1 + num2); + continue; + } + break; + + default: + app_error("lastsig = %d not handled!\n", last_sig); + break; + } + + /* Rewrite user prompt to show current number of lives and timeout. */ + sigset_t set, oldset; + sigemptyset(&set); + sigaddset(&set, SIGINT); + sigaddset(&set, SIGALRM); + Sigprocmask(SIG_BLOCK, &set, &oldset); + + int x, y; + tty_curpos(tty, &x, &y); + dprintf(STDOUT_FILENO, CHA(1) "lives: %d timeout: %d > ", lives, timeout); + if (last_sig == SIGALRM) + dprintf(STDOUT_FILENO, CHA(%d), y); + + Sigprocmask(SIG_SETMASK, &oldset, NULL); + + /* Read a number from user. */ + last_sig = readnum(&sum); + if (last_sig) + continue; + + /* Line contains user input (a number) terminated with '\0'. */ + if (sum == num1 + num2) { + printf("Correct!\n"); + score++; + } else { + printf("Incorrect!\n"); + lives--; + } + } + + Close(tty); + + printf("Game over! Your score is %d.\n", score); +} + +int main(void) { + /* Initialize PRNG seed. */ + struct timeval tv; + gettimeofday(&tv, NULL); + srandom(tv.tv_usec); + + /* SIGALRM is used for timeouts, SIGINT for graceful exit. */ + Signal(SIGALRM, signal_handler); + Signal(SIGINT, signal_handler); + + game(); + + return EXIT_SUCCESS; +} diff --git a/semestr-5/so/lista3/so21_lista_3/include/bitstring.h b/semestr-5/so/lista3/so21_lista_3/include/bitstring.h new file mode 100644 index 0000000..66503f0 --- /dev/null +++ b/semestr-5/so/lista3/so21_lista_3/include/bitstring.h @@ -0,0 +1,138 @@ +/* $NetBSD: bitstring.h,v 1.14 2016/03/17 02:25:32 christos Exp $ */ + +/* + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Paul Vixie. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)bitstring.h 8.1 (Berkeley) 7/19/93 + */ + +#ifndef _BITSTRING_H_ +#define _BITSTRING_H_ + +/* modified for SV/AT and bitstring bugfix by M.R.Murphy, 11oct91 + * bitstr_size changed gratuitously, but shorter + * bit_alloc spelling error fixed + * the following were efficient, but didn't work, they've been made to + * work, but are no longer as efficient :-) + * bit_nclear, bit_nset, bit_ffc, bit_ffs + */ +/* + * The comment above may or may not bear any resemblance to reality. + * This code has been maintained in a confusing way, with little + * information available on the provenance of much of it. "At least it + * works." + * /s/ Perry E. Metzger, 2 Feb 98 + */ +typedef unsigned char bitstr_t; + +/* internal macros */ +/* byte of the bitstring bit is in */ +#define _bit_byte(bit) (uint32_t)((bit) >> 3) + +/* mask for the bit within its byte */ +#define _bit_mask(bit) (uint32_t)((1 << (uint32_t)((bit)&0x7))) + +/* external macros */ +/* bytes in a bitstring of nbits bits */ +#define bitstr_size(nbits) (size_t)((uint32_t)((nbits) + 7) >> 3) + +/* allocate a bitstring */ +#define bit_alloc(nbits) calloc(bitstr_size(nbits), sizeof(bitstr_t)) + +/* allocate a bitstring on the stack */ +#define bit_decl(name, nbits) ((name)[bitstr_size(nbits)]) + +/* is bit N of bitstring name set? */ +#define bit_test(name, bit) \ + /*LINTED bitwise on signed*/ ((name)[_bit_byte(bit)] & _bit_mask(bit)) + +/* set bit N of bitstring name */ +#define bit_set(name, bit) \ + /*LINTED bitwise on signed*/ \ + ((name)[_bit_byte(bit)] = \ + (unsigned char)(_bit_mask(bit) | (name)[_bit_byte(bit)])) + +/* clear bit N of bitstring name */ +#define bit_clear(name, bit) \ + /*LINTED bitwise on signed*/ \ + ((name)[_bit_byte(bit)] &= (unsigned char)~_bit_mask(bit)) + +/* clear bits start ... stop in bitstring */ +#define bit_nclear(name, start, stop) \ + do { \ + bitstr_t *_name = name; \ + size_t _start = start, _stop = stop; \ + while (_start <= _stop) { \ + bit_clear(_name, _start); \ + _start++; \ + } \ + } while (/*CONSTCOND*/ 0) + +/* set bits start ... stop in bitstring */ +#define bit_nset(name, start, stop) \ + do { \ + bitstr_t *_name = name; \ + size_t _start = start, _stop = stop; \ + while (_start <= _stop) { \ + bit_set(_name, _start); \ + _start++; \ + } \ + } while (/*CONSTCOND*/ 0) + +/* find first bit clear in name */ +#define bit_ffc(name, nbits, value) \ + do { \ + const bitstr_t *_name = name; \ + size_t _bit, _nbits = nbits; \ + int _value = -1; \ + for (_bit = 0; _bit < _nbits; ++_bit) \ + if (!bit_test(_name, _bit)) { \ + _value = _bit; \ + break; \ + } \ + *(value) = _value; \ + } while (/*CONSTCOND*/ 0) + +/* find first bit set in name */ +#define bit_ffs(name, nbits, value) \ + do { \ + const bitstr_t *_name = name; \ + size_t _bit, _nbits = nbits; \ + int _value = -1; \ + for (_bit = 0; _bit < _nbits; ++_bit) \ + if (bit_test(_name, _bit)) { \ + _value = _bit; \ + break; \ + } \ + *(value) = _value; \ + } while (/*CONSTCOND*/ 0) + +#endif /* !_BITSTRING_H_ */ diff --git a/semestr-5/so/lista3/so21_lista_3/include/csapp.h b/semestr-5/so/lista3/so21_lista_3/include/csapp.h new file mode 100644 index 0000000..dabdf77 --- /dev/null +++ b/semestr-5/so/lista3/so21_lista_3/include/csapp.h @@ -0,0 +1,240 @@ +#ifndef __CSAPP_H__ +#define __CSAPP_H__ + +#include +#include +#ifdef LINUX +#include +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define _CONCAT(x, y) x##y +#define CONCAT(x, y) _CONCAT(x, y) + +#define min(a, b) \ + ({ \ + typeof(a) _a = (a); \ + typeof(b) _b = (b); \ + _a < _b ? _a : _b; \ + }) + +#define max(a, b) \ + ({ \ + typeof(a) _a = (a); \ + typeof(b) _b = (b); \ + _a > _b ? _a : _b; \ + }) + +#ifndef powerof2 +#define powerof2(x) (((x) & ((x)-1)) == 0) +#endif + +#ifndef __unused +#define __unused __attribute__((unused)) +#endif + +extern char **environ; + +/* Useful constants. */ +#define MAXLINE 4096 + +/* Our own error-handling functions */ +noreturn void unix_error(const char *fmt, ...) + __attribute__((format(printf, 1, 2))); +noreturn void posix_error(int code, const char *fmt, ...) + __attribute__((format(printf, 2, 3))); +noreturn void app_error(const char *fmt, ...) + __attribute__((format(printf, 1, 2))); +noreturn void gai_error(int code, const char *fmt, ...) + __attribute__((format(printf, 2, 3))); + +/* Signal safe I/O functions */ +void safe_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2))); +void safe_error(const char *fmt, ...) __attribute__((format(printf, 1, 2))); + +/* Decent hashing function. */ +#define HASHINIT 5381 + +uint32_t jenkins_hash(const void *key, size_t length, uint32_t initval); + +/* Memory allocation wrappers */ +void *Malloc(size_t size); +void *Realloc(void *ptr, size_t size); +void *Calloc(size_t nmemb, size_t size); + +/* Process control wrappers */ +pid_t Fork(void); +pid_t Waitpid(pid_t pid, int *iptr, int options); +#define Wait(iptr) Waitpid(-1, iptr, 0) +void Prctl(int option, long arg); + +/* Process environment */ +char *Getcwd(char *buf, size_t buflen); + +/* Signal control wrappers */ +void (*Signal(int sig, void (*func)(int)))(int); +void Kill(pid_t pid, int sig); +void Sigprocmask(int how, const sigset_t *set, sigset_t *oldset); +void Sigaction(int signum, const struct sigaction *act, + struct sigaction *oldact); +void Sigsuspend(const sigset_t *mask); + +/* Process group control wrappers */ +void Setpgid(pid_t pid, pid_t pgid); + +/* Stdio wrappers */ +char *Fgets(char *ptr, int n, FILE *stream); +void Fputs(const char *ptr, FILE *stream); + +/* Unix I/O wrappers */ +int Open(const char *pathname, int flags, mode_t mode); +size_t Read(int fd, void *buf, size_t count); +size_t Write(int fd, const void *buf, size_t count); +size_t Writev(int fd, const struct iovec *iov, int iovcnt); +off_t Lseek(int fildes, off_t offset, int whence); +void Close(int fd); +void Ftruncate(int fd, off_t length); +int Dup(int fd); +int Dup2(int oldfd, int newfd); +void Pipe(int fds[2]); +void Socketpair(int domain, int type, int protocol, int sv[2]); +int Select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, + struct timeval *timeout); +int Poll(struct pollfd *fds, nfds_t nfds, int timeout); + +/* Directory access (Linux specific) */ +struct linux_dirent { + unsigned long d_ino; /* Inode number */ + unsigned long d_off; /* Offset to next linux_dirent */ + unsigned short d_reclen; /* Length of this linux_dirent */ + char d_name[]; /* Filename (null-terminated) */ +}; + +int Getdents(int fd, struct linux_dirent *dirp, unsigned count); + +/* Directory operations */ +void Rename(const char *oldpath, const char *newpath); +void Unlink(const char *pathname); + +/* File metadata access wrapper */ +void Fstat(int fd, struct stat *statbuf); +void Fstatat(int dirfd, const char *pathname, struct stat *statbuf, int flags); +size_t Readlink(const char *pathname, char *buf, size_t bufsiz); +size_t Readlinkat(int dirfd, const char *pathname, char *buf, size_t bufsiz); + +/* Memory mapped files & anonymous memory */ +void *Mmap(void *addr, size_t length, int prot, int flags, int fd, + off_t offset); +void Mprotect(void *addr, size_t len, int prot); +void Munmap(void *addr, size_t len); +void Madvise(void *addr, size_t length, int advice); + +/* Terminal control */ +void Tcsetpgrp(int fd, pid_t pgrp); +pid_t Tcgetpgrp(int fd); +void Tcsetattr(int fd, int action, const struct termios *termios_p); +void Tcgetattr(int fd, struct termios *termios_p); + +/* Setjmp & longjmp implementation without sigprocmask */ +typedef struct { + long rbx; + long rbp; + long r12; + long r13; + long r14; + long r15; + void *rsp; + void *rip; +} Jmpbuf[1]; + +int Setjmp(Jmpbuf env); +noreturn void Longjmp(Jmpbuf env, int val); + +/* Socket interface wrappers. */ +typedef struct sockaddr SA; +int Socket(int domain, int type, int protocol); +void Setsockopt(int s, int level, int optname, const void *optval, int optlen); +void Bind(int sockfd, struct sockaddr *my_addr, int addrlen); +void Listen(int s, int backlog); +int Accept(int s, struct sockaddr *addr, socklen_t *addrlen); +void Connect(int sockfd, struct sockaddr *serv_addr, int addrlen); + +/* Protocol-independent wrappers. */ +void Getaddrinfo(const char *node, const char *service, + const struct addrinfo *hints, struct addrinfo **res); +void Getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, + size_t hostlen, char *serv, size_t servlen, int flags); +int open_clientfd(char *hostname, char *port); +int Open_clientfd(char *hostname, char *port); +int open_listenfd(char *port, int backlog); +int Open_listenfd(char *port, int backlog); + +/* POSIX thread control wrappers. */ + +void Pthread_create(pthread_t *tidp, pthread_attr_t *attrp, + void *(*routine)(void *), void *argp); +void Pthread_cancel(pthread_t tid); +void Pthread_join(pthread_t tid, void **thread_return); +void Pthread_detach(pthread_t tid); + +/* POSIX semaphore wrappers. */ +void Sem_init(sem_t *sem, int pshared, unsigned value); +void Sem_destroy(sem_t *sem); +void Sem_wait(sem_t *sem); +void Sem_getvalue(sem_t *sem, int *sval); +void Sem_post(sem_t *sem); + +/* POSIX mutex wrappers. */ +void Pthread_mutex_init(pthread_mutex_t *mutex, + const pthread_mutexattr_t *mutexattr); +void Pthread_mutex_destroy(pthread_mutex_t *mutex); +void Pthread_mutex_lock(pthread_mutex_t *mutex); +void Pthread_mutex_unlock(pthread_mutex_t *mutex); + +/* POSIX conditional variable wrappers. */ +void Pthread_cond_init(pthread_cond_t *cond, pthread_condattr_t *cond_attr); +void Pthread_cond_destroy(pthread_cond_t *cond); +void Pthread_cond_signal(pthread_cond_t *cond); +void Pthread_cond_broadcast(pthread_cond_t *cond); +void Pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex); + +/* POSIX reader-writer lock wrappers. */ +void Pthread_rwlock_init(pthread_rwlock_t *rwlock, + const pthread_rwlockattr_t *rwlockattr); +void Pthread_rwlock_destroy(pthread_rwlock_t *rwlock); +void Pthread_rwlock_rdlock(pthread_rwlock_t *rwlock); +void Pthread_rwlock_wrlock(pthread_rwlock_t *rwlock); +void Pthread_rwlock_unlock(pthread_rwlock_t *rwlock); + +#endif /* __CSAPP_H__ */ diff --git a/semestr-5/so/lista3/so21_lista_3/include/queue.h b/semestr-5/so/lista3/so21_lista_3/include/queue.h new file mode 100644 index 0000000..de4ddc9 --- /dev/null +++ b/semestr-5/so/lista3/so21_lista_3/include/queue.h @@ -0,0 +1,587 @@ +/* $NetBSD: queue.h,v 1.74 2019/03/23 12:01:18 maxv Exp $ */ + +/* + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)queue.h 8.5 (Berkeley) 8/20/94 + */ + +#ifndef _QUEUE_H_ +#define _QUEUE_H_ + +/* + * This file defines five types of data structures: singly-linked lists, + * lists, simple queues, tail queues, and circular queues. + * + * A singly-linked list is headed by a single forward pointer. The + * elements are singly linked for minimum space and pointer manipulation + * overhead at the expense of O(n) removal for arbitrary elements. New + * elements can be added to the list after an existing element or at the + * head of the list. Elements being removed from the head of the list + * should use the explicit macro for this purpose for optimum + * efficiency. A singly-linked list may only be traversed in the forward + * direction. Singly-linked lists are ideal for applications with large + * datasets and few or no removals or for implementing a LIFO queue. + * + * A list is headed by a single forward pointer (or an array of forward + * pointers for a hash table header). The elements are doubly linked + * so that an arbitrary element can be removed without a need to + * traverse the list. New elements can be added to the list before + * or after an existing element or at the head of the list. A list + * may only be traversed in the forward direction. + * + * A simple queue is headed by a pair of pointers, one the head of the + * list and the other to the tail of the list. The elements are singly + * linked to save space, so elements can only be removed from the + * head of the list. New elements can be added to the list after + * an existing element, at the head of the list, or at the end of the + * list. A simple queue may only be traversed in the forward direction. + * + * A tail queue is headed by a pair of pointers, one to the head of the + * list and the other to the tail of the list. The elements are doubly + * linked so that an arbitrary element can be removed without a need to + * traverse the list. New elements can be added to the list before or + * after an existing element, at the head of the list, or at the end of + * the list. A tail queue may be traversed in either direction. + * + * A circle queue is headed by a pair of pointers, one to the head of the + * list and the other to the tail of the list. The elements are doubly + * linked so that an arbitrary element can be removed without a need to + * traverse the list. New elements can be added to the list before or after + * an existing element, at the head of the list, or at the end of the list. + * A circle queue may be traversed in either direction, but has a more + * complex end of list detection. + * + * For details on the use of these macros, see the queue(3) manual page. + */ + +/* + * Include the definition of NULL only on NetBSD because sys/null.h + * is not available elsewhere. This conditional makes the header + * portable and it can simply be dropped verbatim into any system. + * The caveat is that on other systems some other header + * must provide NULL before the macros can be used. + */ + +/* + * Singly-linked List definitions. + */ +#define SLIST_HEAD(name, type) \ + struct name { \ + struct type *slh_first; /* first element */ \ + } + +#define SLIST_HEAD_INITIALIZER(head) \ + { NULL } + +#define SLIST_ENTRY(type) \ + struct { \ + struct type *sle_next; /* next element */ \ + } + +/* + * Singly-linked List access methods. + */ +#define SLIST_FIRST(head) ((head)->slh_first) +#define SLIST_END(head) NULL +#define SLIST_EMPTY(head) ((head)->slh_first == NULL) +#define SLIST_NEXT(elm, field) ((elm)->field.sle_next) + +#define SLIST_FOREACH(var, head, field) \ + for ((var) = (head)->slh_first; (var) != SLIST_END(head); \ + (var) = (var)->field.sle_next) + +#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ + for ((var) = SLIST_FIRST((head)); \ + (var) != SLIST_END(head) && ((tvar) = SLIST_NEXT((var), field), 1); \ + (var) = (tvar)) + +/* + * Singly-linked List functions. + */ +#define SLIST_INIT(head) \ + do { \ + (head)->slh_first = SLIST_END(head); \ + } while (/*CONSTCOND*/ 0) + +#define SLIST_INSERT_AFTER(slistelm, elm, field) \ + do { \ + (elm)->field.sle_next = (slistelm)->field.sle_next; \ + (slistelm)->field.sle_next = (elm); \ + } while (/*CONSTCOND*/ 0) + +#define SLIST_INSERT_HEAD(head, elm, field) \ + do { \ + (elm)->field.sle_next = (head)->slh_first; \ + (head)->slh_first = (elm); \ + } while (/*CONSTCOND*/ 0) + +#define SLIST_REMOVE_AFTER(slistelm, field) \ + do { \ + (slistelm)->field.sle_next = \ + SLIST_NEXT(SLIST_NEXT((slistelm), field), field); \ + } while (/*CONSTCOND*/ 0) + +#define SLIST_REMOVE_HEAD(head, field) \ + do { \ + (head)->slh_first = (head)->slh_first->field.sle_next; \ + } while (/*CONSTCOND*/ 0) + +#define SLIST_REMOVE(head, elm, type, field) \ + do { \ + if ((head)->slh_first == (elm)) { \ + SLIST_REMOVE_HEAD((head), field); \ + } else { \ + struct type *curelm = (head)->slh_first; \ + while (curelm->field.sle_next != (elm)) \ + curelm = curelm->field.sle_next; \ + curelm->field.sle_next = curelm->field.sle_next->field.sle_next; \ + } \ + } while (/*CONSTCOND*/ 0) + +/* + * List definitions. + */ +#define LIST_HEAD(name, type) \ + struct name { \ + struct type *lh_first; /* first element */ \ + } + +#define LIST_HEAD_INITIALIZER(head) \ + { NULL } + +#define LIST_ENTRY(type) \ + struct { \ + struct type *le_next; /* next element */ \ + struct type **le_prev; /* address of previous next element */ \ + } + +/* + * List access methods. + */ +#define LIST_FIRST(head) ((head)->lh_first) +#define LIST_END(head) NULL +#define LIST_EMPTY(head) ((head)->lh_first == LIST_END(head)) +#define LIST_NEXT(elm, field) ((elm)->field.le_next) + +#define LIST_FOREACH(var, head, field) \ + for ((var) = ((head)->lh_first); (var) != LIST_END(head); \ + (var) = ((var)->field.le_next)) + +#define LIST_FOREACH_SAFE(var, head, field, tvar) \ + for ((var) = LIST_FIRST((head)); \ + (var) != LIST_END(head) && ((tvar) = LIST_NEXT((var), field), 1); \ + (var) = (tvar)) + +#define LIST_MOVE(head1, head2, field) \ + do { \ + LIST_INIT((head2)); \ + if (!LIST_EMPTY((head1))) { \ + (head2)->lh_first = (head1)->lh_first; \ + (head2)->lh_first->field.le_prev = &(head2)->lh_first; \ + LIST_INIT((head1)); \ + } \ + } while (/*CONSTCOND*/ 0) + +/* + * List functions. + */ +#define LIST_INIT(head) \ + do { \ + (head)->lh_first = LIST_END(head); \ + } while (/*CONSTCOND*/ 0) + +#define LIST_INSERT_AFTER(listelm, elm, field) \ + do { \ + if (((elm)->field.le_next = (listelm)->field.le_next) != LIST_END(head)) \ + (listelm)->field.le_next->field.le_prev = &(elm)->field.le_next; \ + (listelm)->field.le_next = (elm); \ + (elm)->field.le_prev = &(listelm)->field.le_next; \ + } while (/*CONSTCOND*/ 0) + +#define LIST_INSERT_BEFORE(listelm, elm, field) \ + do { \ + (elm)->field.le_prev = (listelm)->field.le_prev; \ + (elm)->field.le_next = (listelm); \ + *(listelm)->field.le_prev = (elm); \ + (listelm)->field.le_prev = &(elm)->field.le_next; \ + } while (/*CONSTCOND*/ 0) + +#define LIST_INSERT_HEAD(head, elm, field) \ + do { \ + if (((elm)->field.le_next = (head)->lh_first) != LIST_END(head)) \ + (head)->lh_first->field.le_prev = &(elm)->field.le_next; \ + (head)->lh_first = (elm); \ + (elm)->field.le_prev = &(head)->lh_first; \ + } while (/*CONSTCOND*/ 0) + +#define LIST_REMOVE(elm, field) \ + do { \ + if ((elm)->field.le_next != NULL) \ + (elm)->field.le_next->field.le_prev = (elm)->field.le_prev; \ + *(elm)->field.le_prev = (elm)->field.le_next; \ + } while (/*CONSTCOND*/ 0) + +#define LIST_REPLACE(elm, elm2, field) \ + do { \ + if (((elm2)->field.le_next = (elm)->field.le_next) != NULL) \ + (elm2)->field.le_next->field.le_prev = &(elm2)->field.le_next; \ + (elm2)->field.le_prev = (elm)->field.le_prev; \ + *(elm2)->field.le_prev = (elm2); \ + } while (/*CONSTCOND*/ 0) + +/* + * Simple queue definitions. + */ +#define SIMPLEQ_HEAD(name, type) \ + struct name { \ + struct type *sqh_first; /* first element */ \ + struct type **sqh_last; /* addr of last next element */ \ + } + +#define SIMPLEQ_HEAD_INITIALIZER(head) \ + { NULL, &(head).sqh_first } + +#define SIMPLEQ_ENTRY(type) \ + struct { \ + struct type *sqe_next; /* next element */ \ + } + +/* + * Simple queue access methods. + */ +#define SIMPLEQ_FIRST(head) ((head)->sqh_first) +#define SIMPLEQ_END(head) NULL +#define SIMPLEQ_EMPTY(head) ((head)->sqh_first == SIMPLEQ_END(head)) +#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next) + +#define SIMPLEQ_FOREACH(var, head, field) \ + for ((var) = ((head)->sqh_first); (var) != SIMPLEQ_END(head); \ + (var) = ((var)->field.sqe_next)) + +#define SIMPLEQ_FOREACH_SAFE(var, head, field, next) \ + for ((var) = ((head)->sqh_first); \ + (var) != SIMPLEQ_END(head) && ((next = ((var)->field.sqe_next)), 1); \ + (var) = (next)) + +/* + * Simple queue functions. + */ +#define SIMPLEQ_INIT(head) \ + do { \ + (head)->sqh_first = NULL; \ + (head)->sqh_last = &(head)->sqh_first; \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_INSERT_HEAD(head, elm, field) \ + do { \ + if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \ + (head)->sqh_last = &(elm)->field.sqe_next; \ + (head)->sqh_first = (elm); \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_INSERT_TAIL(head, elm, field) \ + do { \ + (elm)->field.sqe_next = NULL; \ + *(head)->sqh_last = (elm); \ + (head)->sqh_last = &(elm)->field.sqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) \ + do { \ + if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL) \ + (head)->sqh_last = &(elm)->field.sqe_next; \ + (listelm)->field.sqe_next = (elm); \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_REMOVE_HEAD(head, field) \ + do { \ + if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \ + (head)->sqh_last = &(head)->sqh_first; \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_REMOVE_AFTER(head, elm, field) \ + do { \ + if (((elm)->field.sqe_next = (elm)->field.sqe_next->field.sqe_next) == \ + NULL) \ + (head)->sqh_last = &(elm)->field.sqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_REMOVE(head, elm, type, field) \ + do { \ + if ((head)->sqh_first == (elm)) { \ + SIMPLEQ_REMOVE_HEAD((head), field); \ + } else { \ + struct type *curelm = (head)->sqh_first; \ + while (curelm->field.sqe_next != (elm)) \ + curelm = curelm->field.sqe_next; \ + if ((curelm->field.sqe_next = curelm->field.sqe_next->field.sqe_next) == \ + NULL) \ + (head)->sqh_last = &(curelm)->field.sqe_next; \ + } \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_CONCAT(head1, head2) \ + do { \ + if (!SIMPLEQ_EMPTY((head2))) { \ + *(head1)->sqh_last = (head2)->sqh_first; \ + (head1)->sqh_last = (head2)->sqh_last; \ + SIMPLEQ_INIT((head2)); \ + } \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_LAST(head, type, field) \ + (SIMPLEQ_EMPTY((head)) \ + ? NULL \ + : ((struct type *)(void *)((char *)((head)->sqh_last) - \ + offsetof(struct type, field)))) + +/* + * Tail queue definitions. + */ +#define _TAILQ_HEAD(name, type, qual) \ + struct name { \ + qual type *tqh_first; /* first element */ \ + qual type *qual *tqh_last; /* addr of last next element */ \ + } +#define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type, ) + +#define TAILQ_HEAD_INITIALIZER(head) \ + { TAILQ_END(head), &(head).tqh_first } + +#define _TAILQ_ENTRY(type, qual) \ + struct { \ + qual type *tqe_next; /* next element */ \ + qual type *qual *tqe_prev; /* address of previous next element */ \ + } +#define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type, ) + +/* + * Tail queue access methods. + */ +#define TAILQ_FIRST(head) ((head)->tqh_first) +#define TAILQ_END(head) (NULL) +#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) +#define TAILQ_LAST(head, headname) \ + (*(((struct headname *)(void *)((head)->tqh_last))->tqh_last)) +#define TAILQ_PREV(elm, headname, field) \ + (*(((struct headname *)(void *)((elm)->field.tqe_prev))->tqh_last)) +#define TAILQ_EMPTY(head) (TAILQ_FIRST(head) == TAILQ_END(head)) + +#define TAILQ_FOREACH(var, head, field) \ + for ((var) = ((head)->tqh_first); (var) != TAILQ_END(head); \ + (var) = ((var)->field.tqe_next)) + +#define TAILQ_FOREACH_SAFE(var, head, field, next) \ + for ((var) = ((head)->tqh_first); \ + (var) != TAILQ_END(head) && ((next) = TAILQ_NEXT(var, field), 1); \ + (var) = (next)) + +#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ + for ((var) = TAILQ_LAST((head), headname); (var) != TAILQ_END(head); \ + (var) = TAILQ_PREV((var), headname, field)) + +#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, prev) \ + for ((var) = TAILQ_LAST((head), headname); \ + (var) != TAILQ_END(head) && \ + ((prev) = TAILQ_PREV((var), headname, field), 1); \ + (var) = (prev)) + +/* + * Tail queue functions. + */ +#define TAILQ_INIT(head) \ + do { \ + (head)->tqh_first = TAILQ_END(head); \ + (head)->tqh_last = &(head)->tqh_first; \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_INSERT_HEAD(head, elm, field) \ + do { \ + if (((elm)->field.tqe_next = (head)->tqh_first) != TAILQ_END(head)) \ + (head)->tqh_first->field.tqe_prev = &(elm)->field.tqe_next; \ + else \ + (head)->tqh_last = &(elm)->field.tqe_next; \ + (head)->tqh_first = (elm); \ + (elm)->field.tqe_prev = &(head)->tqh_first; \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_INSERT_TAIL(head, elm, field) \ + do { \ + (elm)->field.tqe_next = TAILQ_END(head); \ + (elm)->field.tqe_prev = (head)->tqh_last; \ + *(head)->tqh_last = (elm); \ + (head)->tqh_last = &(elm)->field.tqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_INSERT_AFTER(head, listelm, elm, field) \ + do { \ + if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != \ + TAILQ_END(head)) \ + (elm)->field.tqe_next->field.tqe_prev = &(elm)->field.tqe_next; \ + else \ + (head)->tqh_last = &(elm)->field.tqe_next; \ + (listelm)->field.tqe_next = (elm); \ + (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_INSERT_BEFORE(listelm, elm, field) \ + do { \ + (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ + (elm)->field.tqe_next = (listelm); \ + *(listelm)->field.tqe_prev = (elm); \ + (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_REMOVE(head, elm, field) \ + do { \ + if (((elm)->field.tqe_next) != TAILQ_END(head)) \ + (elm)->field.tqe_next->field.tqe_prev = (elm)->field.tqe_prev; \ + else \ + (head)->tqh_last = (elm)->field.tqe_prev; \ + *(elm)->field.tqe_prev = (elm)->field.tqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_REPLACE(head, elm, elm2, field) \ + do { \ + if (((elm2)->field.tqe_next = (elm)->field.tqe_next) != TAILQ_END(head)) \ + (elm2)->field.tqe_next->field.tqe_prev = &(elm2)->field.tqe_next; \ + else \ + (head)->tqh_last = &(elm2)->field.tqe_next; \ + (elm2)->field.tqe_prev = (elm)->field.tqe_prev; \ + *(elm2)->field.tqe_prev = (elm2); \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_CONCAT(head1, head2, field) \ + do { \ + if (!TAILQ_EMPTY(head2)) { \ + *(head1)->tqh_last = (head2)->tqh_first; \ + (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \ + (head1)->tqh_last = (head2)->tqh_last; \ + TAILQ_INIT((head2)); \ + } \ + } while (/*CONSTCOND*/ 0) + +/* + * Singly-linked Tail queue declarations. + */ +#define STAILQ_HEAD(name, type) \ + struct name { \ + struct type *stqh_first; /* first element */ \ + struct type **stqh_last; /* addr of last next element */ \ + } + +#define STAILQ_HEAD_INITIALIZER(head) \ + { NULL, &(head).stqh_first } + +#define STAILQ_ENTRY(type) \ + struct { \ + struct type *stqe_next; /* next element */ \ + } + +/* + * Singly-linked Tail queue access methods. + */ +#define STAILQ_FIRST(head) ((head)->stqh_first) +#define STAILQ_END(head) NULL +#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) +#define STAILQ_EMPTY(head) (STAILQ_FIRST(head) == STAILQ_END(head)) + +/* + * Singly-linked Tail queue functions. + */ +#define STAILQ_INIT(head) \ + do { \ + (head)->stqh_first = NULL; \ + (head)->stqh_last = &(head)->stqh_first; \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_INSERT_HEAD(head, elm, field) \ + do { \ + if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \ + (head)->stqh_last = &(elm)->field.stqe_next; \ + (head)->stqh_first = (elm); \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_INSERT_TAIL(head, elm, field) \ + do { \ + (elm)->field.stqe_next = NULL; \ + *(head)->stqh_last = (elm); \ + (head)->stqh_last = &(elm)->field.stqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_INSERT_AFTER(head, listelm, elm, field) \ + do { \ + if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL) \ + (head)->stqh_last = &(elm)->field.stqe_next; \ + (listelm)->field.stqe_next = (elm); \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_REMOVE_HEAD(head, field) \ + do { \ + if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \ + (head)->stqh_last = &(head)->stqh_first; \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_REMOVE(head, elm, type, field) \ + do { \ + if ((head)->stqh_first == (elm)) { \ + STAILQ_REMOVE_HEAD((head), field); \ + } else { \ + struct type *curelm = (head)->stqh_first; \ + while (curelm->field.stqe_next != (elm)) \ + curelm = curelm->field.stqe_next; \ + if ((curelm->field.stqe_next = \ + curelm->field.stqe_next->field.stqe_next) == NULL) \ + (head)->stqh_last = &(curelm)->field.stqe_next; \ + } \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_FOREACH(var, head, field) \ + for ((var) = ((head)->stqh_first); (var); (var) = ((var)->field.stqe_next)) + +#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ + for ((var) = STAILQ_FIRST((head)); \ + (var) && ((tvar) = STAILQ_NEXT((var), field), 1); (var) = (tvar)) + +#define STAILQ_CONCAT(head1, head2) \ + do { \ + if (!STAILQ_EMPTY((head2))) { \ + *(head1)->stqh_last = (head2)->stqh_first; \ + (head1)->stqh_last = (head2)->stqh_last; \ + STAILQ_INIT((head2)); \ + } \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_LAST(head, type, field) \ + (STAILQ_EMPTY((head)) \ + ? NULL \ + : ((struct type *)(void *)((char *)((head)->stqh_last) - \ + offsetof(struct type, field)))) + +#endif /* !_QUEUE_H_ */ diff --git a/semestr-5/so/lista3/so21_lista_3/include/rio.h b/semestr-5/so/lista3/so21_lista_3/include/rio.h new file mode 100644 index 0000000..bd62723 --- /dev/null +++ b/semestr-5/so/lista3/so21_lista_3/include/rio.h @@ -0,0 +1,27 @@ +#ifndef _RIO_H_ +#define _RIO_H_ + +/* Persistent state for the robust I/O (Rio) package */ +#define RIO_BUFSIZE 8192 + +typedef struct { + int rio_fd; /* Descriptor for this internal buf */ + int rio_cnt; /* Unread bytes in internal buf */ + char *rio_bufptr; /* Next unread byte in internal buf */ + char rio_buf[RIO_BUFSIZE]; /* Internal buffer */ +} rio_t; + +/* Rio (Robust I/O) package */ +ssize_t rio_readn(int fd, void *usrbuf, size_t n); +ssize_t rio_writen(int fd, const void *usrbuf, size_t n); +void rio_readinitb(rio_t *rp, int fd); +ssize_t rio_readnb(rio_t *rp, void *usrbuf, size_t n); +ssize_t rio_readlineb(rio_t *rp, void *usrbuf, size_t maxlen); + +/* Wrappers that exit on failure */ +ssize_t Rio_readn(int fd, void *ptr, size_t nbytes); +void Rio_writen(int fd, const void *usrbuf, size_t n); +ssize_t Rio_readnb(rio_t *rp, void *usrbuf, size_t n); +ssize_t Rio_readlineb(rio_t *rp, void *usrbuf, size_t maxlen); + +#endif /* !_RIO_H_ */ diff --git a/semestr-5/so/lista3/so21_lista_3/include/terminal.h b/semestr-5/so/lista3/so21_lista_3/include/terminal.h new file mode 100644 index 0000000..832358e --- /dev/null +++ b/semestr-5/so/lista3/so21_lista_3/include/terminal.h @@ -0,0 +1,27 @@ +#ifndef _TERMINAL_H_ +#define _TERMINAL_H_ + +int tty_open(void); +void tty_curpos(int fd, int *x, int *y); + +/* https://en.wikipedia.org/wiki/ANSI_escape_code#Terminal_output_sequences */ + +#define ESC "\033" +#define CSI ESC "[" + +#define CUU(n) CSI #n "A" /* Cursor Up */ +#define CUD(n) CSI #n "B" /* Cursor Down */ +#define CUF(n) CSI #n "C" /* Cursor Forward */ +#define CUB(n) CSI #n "D" /* Cursor Back */ +#define CNL(n) CSI #n "E" /* Cursor Next Line */ +#define CPL(n) CSI #n "F" /* Cursor Previous Line */ +#define CHA(n) CSI #n "G" /* Cursor Horizontal Absolute */ +#define CUP(n, m) CSI #n ";" #m "H" /* Cursor Position */ +#define ED(n) CSI #n "J" /* Erase in Display */ +#define EL(n) CSI #n "K" /* Erase in Line */ +#define SU(n) CSI #n "S" /* Scroll Up Scroll */ +#define SD(n) CSI #n "T" /* Scroll Down Scroll */ +#define CPR() CSI "6n" /* Cursor Position Report */ +#define SGR(x) CSI x "m" + +#endif /* !_ANSICODES_H_ */ diff --git a/semestr-5/so/lista3/so21_lista_3/include/tree.h b/semestr-5/so/lista3/so21_lista_3/include/tree.h new file mode 100644 index 0000000..3355bad --- /dev/null +++ b/semestr-5/so/lista3/so21_lista_3/include/tree.h @@ -0,0 +1,735 @@ +/* $NetBSD: tree.h,v 1.20 2013/09/14 13:20:45 joerg Exp $ */ +/* $OpenBSD: tree.h,v 1.13 2011/07/09 00:19:45 pirofti Exp $ */ +/* + * Copyright 2002 Niels Provos + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _TREE_H_ +#define _TREE_H_ + +/* + * This file defines data structures for different types of trees: + * splay trees and red-black trees. + * + * A splay tree is a self-organizing data structure. Every operation + * on the tree causes a splay to happen. The splay moves the requested + * node to the root of the tree and partly rebalances it. + * + * This has the benefit that request locality causes faster lookups as + * the requested nodes move to the top of the tree. On the other hand, + * every lookup causes memory writes. + * + * The Balance Theorem bounds the total access time for m operations + * and n inserts on an initially empty tree as O((m + n)lg n). The + * amortized cost for a sequence of m accesses to a splay tree is O(lg n); + * + * A red-black tree is a binary search tree with the node color as an + * extra attribute. It fulfills a set of conditions: + * - every search path from the root to a leaf consists of the + * same number of black nodes, + * - each red node (except for the root) has a black parent, + * - each leaf node is black. + * + * Every operation on a red-black tree is bounded as O(lg n). + * The maximum height of a red-black tree is 2lg (n+1). + */ + +#define SPLAY_HEAD(name, type) \ + struct name { \ + struct type *sph_root; /* root of the tree */ \ + } + +#define SPLAY_INITIALIZER(root) \ + { NULL } + +#define SPLAY_INIT(root) \ + do { \ + (root)->sph_root = NULL; \ + } while (/*CONSTCOND*/ 0) + +#define SPLAY_ENTRY(type) \ + struct { \ + struct type *spe_left; /* left element */ \ + struct type *spe_right; /* right element */ \ + } + +#define SPLAY_LEFT(elm, field) (elm)->field.spe_left +#define SPLAY_RIGHT(elm, field) (elm)->field.spe_right +#define SPLAY_ROOT(head) (head)->sph_root +#define SPLAY_EMPTY(head) (SPLAY_ROOT(head) == NULL) + +/* SPLAY_ROTATE_{LEFT,RIGHT} expect that tmp hold SPLAY_{RIGHT,LEFT} */ +#define SPLAY_ROTATE_RIGHT(head, tmp, field) \ + do { \ + SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field); \ + SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ + (head)->sph_root = tmp; \ + } while (/*CONSTCOND*/ 0) + +#define SPLAY_ROTATE_LEFT(head, tmp, field) \ + do { \ + SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \ + SPLAY_LEFT(tmp, field) = (head)->sph_root; \ + (head)->sph_root = tmp; \ + } while (/*CONSTCOND*/ 0) + +#define SPLAY_LINKLEFT(head, tmp, field) \ + do { \ + SPLAY_LEFT(tmp, field) = (head)->sph_root; \ + tmp = (head)->sph_root; \ + (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \ + } while (/*CONSTCOND*/ 0) + +#define SPLAY_LINKRIGHT(head, tmp, field) \ + do { \ + SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ + tmp = (head)->sph_root; \ + (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \ + } while (/*CONSTCOND*/ 0) + +#define SPLAY_ASSEMBLE(head, node, left, right, field) \ + do { \ + SPLAY_RIGHT(left, field) = SPLAY_LEFT((head)->sph_root, field); \ + SPLAY_LEFT(right, field) = SPLAY_RIGHT((head)->sph_root, field); \ + SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(node, field); \ + SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(node, field); \ + } while (/*CONSTCOND*/ 0) + +/* Generates prototypes and inline functions */ + +#define SPLAY_PROTOTYPE(name, type, field, cmp) \ + void name##_SPLAY(struct name *, struct type *); \ + void name##_SPLAY_MINMAX(struct name *, int); \ + struct type *name##_SPLAY_INSERT(struct name *, struct type *); \ + struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \ + \ + /* Finds the node with the same key as elm */ \ + static __inline struct type *name##_SPLAY_FIND(struct name *head, \ + struct type *elm) { \ + if (SPLAY_EMPTY(head)) \ + return (NULL); \ + name##_SPLAY(head, elm); \ + if ((cmp)(elm, (head)->sph_root) == 0) \ + return (head->sph_root); \ + return (NULL); \ + } \ + \ + static __inline __unused struct type *name##_SPLAY_NEXT(struct name *head, \ + struct type *elm) { \ + name##_SPLAY(head, elm); \ + if (SPLAY_RIGHT(elm, field) != NULL) { \ + elm = SPLAY_RIGHT(elm, field); \ + while (SPLAY_LEFT(elm, field) != NULL) { \ + elm = SPLAY_LEFT(elm, field); \ + } \ + } else \ + elm = NULL; \ + return (elm); \ + } \ + \ + static __unused __inline struct type *name##_SPLAY_MIN_MAX( \ + struct name *head, int val) { \ + name##_SPLAY_MINMAX(head, val); \ + return (SPLAY_ROOT(head)); \ + } + +/* Main splay operation. + * Moves node close to the key of elm to top + */ +#define SPLAY_GENERATE(name, type, field, cmp) \ + struct type *name##_SPLAY_INSERT(struct name *head, struct type *elm) { \ + if (SPLAY_EMPTY(head)) { \ + SPLAY_LEFT(elm, field) = SPLAY_RIGHT(elm, field) = NULL; \ + } else { \ + int __comp; \ + name##_SPLAY(head, elm); \ + __comp = (cmp)(elm, (head)->sph_root); \ + if (__comp < 0) { \ + SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field); \ + SPLAY_RIGHT(elm, field) = (head)->sph_root; \ + SPLAY_LEFT((head)->sph_root, field) = NULL; \ + } else if (__comp > 0) { \ + SPLAY_RIGHT(elm, field) = SPLAY_RIGHT((head)->sph_root, field); \ + SPLAY_LEFT(elm, field) = (head)->sph_root; \ + SPLAY_RIGHT((head)->sph_root, field) = NULL; \ + } else \ + return ((head)->sph_root); \ + } \ + (head)->sph_root = (elm); \ + return (NULL); \ + } \ + \ + struct type *name##_SPLAY_REMOVE(struct name *head, struct type *elm) { \ + struct type *__tmp; \ + if (SPLAY_EMPTY(head)) \ + return (NULL); \ + name##_SPLAY(head, elm); \ + if ((cmp)(elm, (head)->sph_root) == 0) { \ + if (SPLAY_LEFT((head)->sph_root, field) == NULL) { \ + (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \ + } else { \ + __tmp = SPLAY_RIGHT((head)->sph_root, field); \ + (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \ + name##_SPLAY(head, elm); \ + SPLAY_RIGHT((head)->sph_root, field) = __tmp; \ + } \ + return (elm); \ + } \ + return (NULL); \ + } \ + \ + void name##_SPLAY(struct name *head, struct type *elm) { \ + struct type __node, *__left, *__right, *__tmp; \ + int __comp; \ + \ + SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL; \ + __left = __right = &__node; \ + \ + while ((__comp = (cmp)(elm, (head)->sph_root)) != 0) { \ + if (__comp < 0) { \ + __tmp = SPLAY_LEFT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if ((cmp)(elm, __tmp) < 0) { \ + SPLAY_ROTATE_RIGHT(head, __tmp, field); \ + if (SPLAY_LEFT((head)->sph_root, field) == NULL) \ + break; \ + } \ + SPLAY_LINKLEFT(head, __right, field); \ + } else if (__comp > 0) { \ + __tmp = SPLAY_RIGHT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if ((cmp)(elm, __tmp) > 0) { \ + SPLAY_ROTATE_LEFT(head, __tmp, field); \ + if (SPLAY_RIGHT((head)->sph_root, field) == NULL) \ + break; \ + } \ + SPLAY_LINKRIGHT(head, __left, field); \ + } \ + } \ + SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ + } \ + \ + /* Splay with either the minimum or the maximum element \ + * Used to find minimum or maximum element in tree. \ + */ \ + void name##_SPLAY_MINMAX(struct name *head, int __comp) { \ + struct type __node, *__left, *__right, *__tmp; \ + \ + SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL; \ + __left = __right = &__node; \ + \ + while (1) { \ + if (__comp < 0) { \ + __tmp = SPLAY_LEFT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if (__comp < 0) { \ + SPLAY_ROTATE_RIGHT(head, __tmp, field); \ + if (SPLAY_LEFT((head)->sph_root, field) == NULL) \ + break; \ + } \ + SPLAY_LINKLEFT(head, __right, field); \ + } else if (__comp > 0) { \ + __tmp = SPLAY_RIGHT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if (__comp > 0) { \ + SPLAY_ROTATE_LEFT(head, __tmp, field); \ + if (SPLAY_RIGHT((head)->sph_root, field) == NULL) \ + break; \ + } \ + SPLAY_LINKRIGHT(head, __left, field); \ + } \ + } \ + SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ + } + +#define SPLAY_NEGINF -1 +#define SPLAY_INF 1 + +#define SPLAY_INSERT(name, x, y) name##_SPLAY_INSERT(x, y) +#define SPLAY_REMOVE(name, x, y) name##_SPLAY_REMOVE(x, y) +#define SPLAY_FIND(name, x, y) name##_SPLAY_FIND(x, y) +#define SPLAY_NEXT(name, x, y) name##_SPLAY_NEXT(x, y) +#define SPLAY_MIN(name, x) \ + (SPLAY_EMPTY(x) ? NULL : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF)) +#define SPLAY_MAX(name, x) \ + (SPLAY_EMPTY(x) ? NULL : name##_SPLAY_MIN_MAX(x, SPLAY_INF)) + +#define SPLAY_FOREACH(x, name, head) \ + for ((x) = SPLAY_MIN(name, head); (x) != NULL; \ + (x) = SPLAY_NEXT(name, head, x)) + +/* Macros that define a red-black tree */ +#define RB_HEAD(name, type) \ + struct name { \ + struct type *rbh_root; /* root of the tree */ \ + } + +#define RB_INITIALIZER(root) \ + { NULL } + +#define RB_INIT(root) \ + do { \ + (root)->rbh_root = NULL; \ + } while (/*CONSTCOND*/ 0) + +#define RB_BLACK 0 +#define RB_RED 1 +#define RB_ENTRY(type) \ + struct { \ + struct type *rbe_left; /* left element */ \ + struct type *rbe_right; /* right element */ \ + struct type *rbe_parent; /* parent element */ \ + int rbe_color; /* node color */ \ + } + +#define RB_LEFT(elm, field) (elm)->field.rbe_left +#define RB_RIGHT(elm, field) (elm)->field.rbe_right +#define RB_PARENT(elm, field) (elm)->field.rbe_parent +#define RB_COLOR(elm, field) (elm)->field.rbe_color +#define RB_ROOT(head) (head)->rbh_root +#define RB_EMPTY(head) (RB_ROOT(head) == NULL) + +#define RB_SET(elm, parent, field) \ + do { \ + RB_PARENT(elm, field) = parent; \ + RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL; \ + RB_COLOR(elm, field) = RB_RED; \ + } while (/*CONSTCOND*/ 0) + +#define RB_SET_BLACKRED(black, red, field) \ + do { \ + RB_COLOR(black, field) = RB_BLACK; \ + RB_COLOR(red, field) = RB_RED; \ + } while (/*CONSTCOND*/ 0) + +#ifndef RB_AUGMENT +#define RB_AUGMENT(x) \ + do { \ + } while (/*CONSTCOND*/ 0) +#endif + +#define RB_ROTATE_LEFT(head, elm, tmp, field) \ + do { \ + (tmp) = RB_RIGHT(elm, field); \ + if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field)) != NULL) { \ + RB_PARENT(RB_LEFT(tmp, field), field) = (elm); \ + } \ + RB_AUGMENT(elm); \ + if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \ + if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ + RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ + else \ + RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ + } else \ + (head)->rbh_root = (tmp); \ + RB_LEFT(tmp, field) = (elm); \ + RB_PARENT(elm, field) = (tmp); \ + RB_AUGMENT(tmp); \ + if ((RB_PARENT(tmp, field))) \ + RB_AUGMENT(RB_PARENT(tmp, field)); \ + } while (/*CONSTCOND*/ 0) + +#define RB_ROTATE_RIGHT(head, elm, tmp, field) \ + do { \ + (tmp) = RB_LEFT(elm, field); \ + if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field)) != NULL) { \ + RB_PARENT(RB_RIGHT(tmp, field), field) = (elm); \ + } \ + RB_AUGMENT(elm); \ + if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \ + if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ + RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ + else \ + RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ + } else \ + (head)->rbh_root = (tmp); \ + RB_RIGHT(tmp, field) = (elm); \ + RB_PARENT(elm, field) = (tmp); \ + RB_AUGMENT(tmp); \ + if ((RB_PARENT(tmp, field))) \ + RB_AUGMENT(RB_PARENT(tmp, field)); \ + } while (/*CONSTCOND*/ 0) + +/* Generates prototypes and inline functions */ +#define RB_PROTOTYPE(name, type, field, cmp) \ + RB_PROTOTYPE_INTERNAL(name, type, field, cmp, ) +#define RB_PROTOTYPE_STATIC(name, type, field, cmp) \ + RB_PROTOTYPE_INTERNAL(name, type, field, cmp, __unused static) +#define RB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr) \ + attr void name##_RB_INSERT_COLOR(struct name *, struct type *); \ + attr void name##_RB_REMOVE_COLOR(struct name *, struct type *, \ + struct type *); \ + attr struct type *name##_RB_REMOVE(struct name *, struct type *); \ + attr struct type *name##_RB_INSERT(struct name *, struct type *); \ + attr struct type *name##_RB_FIND(struct name *, struct type *); \ + attr struct type *name##_RB_NFIND(struct name *, struct type *); \ + attr struct type *name##_RB_NEXT(struct type *); \ + attr struct type *name##_RB_PREV(struct type *); \ + attr struct type *name##_RB_MINMAX(struct name *, int); + +/* Main rb operation. + * Moves node close to the key of elm to top + */ +#define RB_GENERATE(name, type, field, cmp) \ + RB_GENERATE_INTERNAL(name, type, field, cmp, ) +#define RB_GENERATE_STATIC(name, type, field, cmp) \ + RB_GENERATE_INTERNAL(name, type, field, cmp, __unused static) +#define RB_GENERATE_INTERNAL(name, type, field, cmp, attr) \ + attr void name##_RB_INSERT_COLOR(struct name *head, struct type *elm) { \ + struct type *parent, *gparent, *tmp; \ + while ((parent = RB_PARENT(elm, field)) != NULL && \ + RB_COLOR(parent, field) == RB_RED) { \ + gparent = RB_PARENT(parent, field); \ + if (parent == RB_LEFT(gparent, field)) { \ + tmp = RB_RIGHT(gparent, field); \ + if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ + RB_COLOR(tmp, field) = RB_BLACK; \ + RB_SET_BLACKRED(parent, gparent, field); \ + elm = gparent; \ + continue; \ + } \ + if (RB_RIGHT(parent, field) == elm) { \ + RB_ROTATE_LEFT(head, parent, tmp, field); \ + tmp = parent; \ + parent = elm; \ + elm = tmp; \ + } \ + RB_SET_BLACKRED(parent, gparent, field); \ + RB_ROTATE_RIGHT(head, gparent, tmp, field); \ + } else { \ + tmp = RB_LEFT(gparent, field); \ + if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ + RB_COLOR(tmp, field) = RB_BLACK; \ + RB_SET_BLACKRED(parent, gparent, field); \ + elm = gparent; \ + continue; \ + } \ + if (RB_LEFT(parent, field) == elm) { \ + RB_ROTATE_RIGHT(head, parent, tmp, field); \ + tmp = parent; \ + parent = elm; \ + elm = tmp; \ + } \ + RB_SET_BLACKRED(parent, gparent, field); \ + RB_ROTATE_LEFT(head, gparent, tmp, field); \ + } \ + } \ + RB_COLOR(head->rbh_root, field) = RB_BLACK; \ + } \ + \ + attr void name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, \ + struct type *elm) { \ + struct type *tmp; \ + while ((elm == NULL || RB_COLOR(elm, field) == RB_BLACK) && \ + elm != RB_ROOT(head)) { \ + if (RB_LEFT(parent, field) == elm) { \ + tmp = RB_RIGHT(parent, field); \ + if (RB_COLOR(tmp, field) == RB_RED) { \ + RB_SET_BLACKRED(tmp, parent, field); \ + RB_ROTATE_LEFT(head, parent, tmp, field); \ + tmp = RB_RIGHT(parent, field); \ + } \ + if ((RB_LEFT(tmp, field) == NULL || \ + RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) && \ + (RB_RIGHT(tmp, field) == NULL || \ + RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) { \ + RB_COLOR(tmp, field) = RB_RED; \ + elm = parent; \ + parent = RB_PARENT(elm, field); \ + } else { \ + if (RB_RIGHT(tmp, field) == NULL || \ + RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK) { \ + struct type *oleft; \ + if ((oleft = RB_LEFT(tmp, field)) != NULL) \ + RB_COLOR(oleft, field) = RB_BLACK; \ + RB_COLOR(tmp, field) = RB_RED; \ + RB_ROTATE_RIGHT(head, tmp, oleft, field); \ + tmp = RB_RIGHT(parent, field); \ + } \ + RB_COLOR(tmp, field) = RB_COLOR(parent, field); \ + RB_COLOR(parent, field) = RB_BLACK; \ + if (RB_RIGHT(tmp, field)) \ + RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK; \ + RB_ROTATE_LEFT(head, parent, tmp, field); \ + elm = RB_ROOT(head); \ + break; \ + } \ + } else { \ + tmp = RB_LEFT(parent, field); \ + if (RB_COLOR(tmp, field) == RB_RED) { \ + RB_SET_BLACKRED(tmp, parent, field); \ + RB_ROTATE_RIGHT(head, parent, tmp, field); \ + tmp = RB_LEFT(parent, field); \ + } \ + if ((RB_LEFT(tmp, field) == NULL || \ + RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) && \ + (RB_RIGHT(tmp, field) == NULL || \ + RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) { \ + RB_COLOR(tmp, field) = RB_RED; \ + elm = parent; \ + parent = RB_PARENT(elm, field); \ + } else { \ + if (RB_LEFT(tmp, field) == NULL || \ + RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) { \ + struct type *oright; \ + if ((oright = RB_RIGHT(tmp, field)) != NULL) \ + RB_COLOR(oright, field) = RB_BLACK; \ + RB_COLOR(tmp, field) = RB_RED; \ + RB_ROTATE_LEFT(head, tmp, oright, field); \ + tmp = RB_LEFT(parent, field); \ + } \ + RB_COLOR(tmp, field) = RB_COLOR(parent, field); \ + RB_COLOR(parent, field) = RB_BLACK; \ + if (RB_LEFT(tmp, field)) \ + RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK; \ + RB_ROTATE_RIGHT(head, parent, tmp, field); \ + elm = RB_ROOT(head); \ + break; \ + } \ + } \ + } \ + if (elm) \ + RB_COLOR(elm, field) = RB_BLACK; \ + } \ + \ + attr struct type *name##_RB_REMOVE(struct name *head, struct type *elm) { \ + struct type *child, *parent, *old = elm; \ + int color; \ + if (RB_LEFT(elm, field) == NULL) \ + child = RB_RIGHT(elm, field); \ + else if (RB_RIGHT(elm, field) == NULL) \ + child = RB_LEFT(elm, field); \ + else { \ + struct type *left; \ + elm = RB_RIGHT(elm, field); \ + while ((left = RB_LEFT(elm, field)) != NULL) \ + elm = left; \ + child = RB_RIGHT(elm, field); \ + parent = RB_PARENT(elm, field); \ + color = RB_COLOR(elm, field); \ + if (child) \ + RB_PARENT(child, field) = parent; \ + if (parent) { \ + if (RB_LEFT(parent, field) == elm) \ + RB_LEFT(parent, field) = child; \ + else \ + RB_RIGHT(parent, field) = child; \ + RB_AUGMENT(parent); \ + } else \ + RB_ROOT(head) = child; \ + if (RB_PARENT(elm, field) == old) \ + parent = elm; \ + (elm)->field = (old)->field; \ + if (RB_PARENT(old, field)) { \ + if (RB_LEFT(RB_PARENT(old, field), field) == old) \ + RB_LEFT(RB_PARENT(old, field), field) = elm; \ + else \ + RB_RIGHT(RB_PARENT(old, field), field) = elm; \ + RB_AUGMENT(RB_PARENT(old, field)); \ + } else \ + RB_ROOT(head) = elm; \ + RB_PARENT(RB_LEFT(old, field), field) = elm; \ + if (RB_RIGHT(old, field)) \ + RB_PARENT(RB_RIGHT(old, field), field) = elm; \ + if (parent) { \ + left = parent; \ + do { \ + RB_AUGMENT(left); \ + } while ((left = RB_PARENT(left, field)) != NULL); \ + } \ + goto color; \ + } \ + parent = RB_PARENT(elm, field); \ + color = RB_COLOR(elm, field); \ + if (child) \ + RB_PARENT(child, field) = parent; \ + if (parent) { \ + if (RB_LEFT(parent, field) == elm) \ + RB_LEFT(parent, field) = child; \ + else \ + RB_RIGHT(parent, field) = child; \ + RB_AUGMENT(parent); \ + } else \ + RB_ROOT(head) = child; \ + color: \ + if (color == RB_BLACK) \ + name##_RB_REMOVE_COLOR(head, parent, child); \ + return (old); \ + } \ + \ + /* Inserts a node into the RB tree */ \ + attr struct type *name##_RB_INSERT(struct name *head, struct type *elm) { \ + struct type *tmp; \ + struct type *parent = NULL; \ + int comp = 0; \ + tmp = RB_ROOT(head); \ + while (tmp) { \ + parent = tmp; \ + comp = (cmp)(elm, parent); \ + if (comp < 0) \ + tmp = RB_LEFT(tmp, field); \ + else if (comp > 0) \ + tmp = RB_RIGHT(tmp, field); \ + else \ + return (tmp); \ + } \ + RB_SET(elm, parent, field); \ + if (parent != NULL) { \ + if (comp < 0) \ + RB_LEFT(parent, field) = elm; \ + else \ + RB_RIGHT(parent, field) = elm; \ + RB_AUGMENT(parent); \ + } else \ + RB_ROOT(head) = elm; \ + name##_RB_INSERT_COLOR(head, elm); \ + return (NULL); \ + } \ + \ + /* Finds the node with the same key as elm */ \ + attr struct type *name##_RB_FIND(struct name *head, struct type *elm) { \ + struct type *tmp = RB_ROOT(head); \ + int comp; \ + while (tmp) { \ + comp = cmp(elm, tmp); \ + if (comp < 0) \ + tmp = RB_LEFT(tmp, field); \ + else if (comp > 0) \ + tmp = RB_RIGHT(tmp, field); \ + else \ + return (tmp); \ + } \ + return (NULL); \ + } \ + \ + /* Finds the first node greater than or equal to the search key */ \ + attr struct type *name##_RB_NFIND(struct name *head, struct type *elm) { \ + struct type *tmp = RB_ROOT(head); \ + struct type *res = NULL; \ + int comp; \ + while (tmp) { \ + comp = cmp(elm, tmp); \ + if (comp < 0) { \ + res = tmp; \ + tmp = RB_LEFT(tmp, field); \ + } else if (comp > 0) \ + tmp = RB_RIGHT(tmp, field); \ + else \ + return (tmp); \ + } \ + return (res); \ + } \ + \ + /* ARGSUSED */ \ + attr struct type *name##_RB_NEXT(struct type *elm) { \ + if (RB_RIGHT(elm, field)) { \ + elm = RB_RIGHT(elm, field); \ + while (RB_LEFT(elm, field)) \ + elm = RB_LEFT(elm, field); \ + } else { \ + if (RB_PARENT(elm, field) && \ + (elm == RB_LEFT(RB_PARENT(elm, field), field))) \ + elm = RB_PARENT(elm, field); \ + else { \ + while (RB_PARENT(elm, field) && \ + (elm == RB_RIGHT(RB_PARENT(elm, field), field))) \ + elm = RB_PARENT(elm, field); \ + elm = RB_PARENT(elm, field); \ + } \ + } \ + return (elm); \ + } \ + \ + /* ARGSUSED */ \ + attr struct type *name##_RB_PREV(struct type *elm) { \ + if (RB_LEFT(elm, field)) { \ + elm = RB_LEFT(elm, field); \ + while (RB_RIGHT(elm, field)) \ + elm = RB_RIGHT(elm, field); \ + } else { \ + if (RB_PARENT(elm, field) && \ + (elm == RB_RIGHT(RB_PARENT(elm, field), field))) \ + elm = RB_PARENT(elm, field); \ + else { \ + while (RB_PARENT(elm, field) && \ + (elm == RB_LEFT(RB_PARENT(elm, field), field))) \ + elm = RB_PARENT(elm, field); \ + elm = RB_PARENT(elm, field); \ + } \ + } \ + return (elm); \ + } \ + \ + attr struct type *name##_RB_MINMAX(struct name *head, int val) { \ + struct type *tmp = RB_ROOT(head); \ + struct type *parent = NULL; \ + while (tmp) { \ + parent = tmp; \ + if (val < 0) \ + tmp = RB_LEFT(tmp, field); \ + else \ + tmp = RB_RIGHT(tmp, field); \ + } \ + return (parent); \ + } + +#define RB_NEGINF -1 +#define RB_INF 1 + +#define RB_INSERT(name, x, y) CONCAT(name,_RB_INSERT(x, y)) +#define RB_REMOVE(name, x, y) CONCAT(name,_RB_REMOVE(x, y)) +#define RB_FIND(name, x, y) CONCAT(name,_RB_FIND(x, y)) +#define RB_NFIND(name, x, y) CONCAT(name,_RB_NFIND(x, y)) +#define RB_NEXT(name, x, y) CONCAT(name,_RB_NEXT(y)) +#define RB_PREV(name, x, y) CONCAT(name,_RB_PREV(y)) +#define RB_MIN(name, x) CONCAT(name,_RB_MINMAX(x, RB_NEGINF)) +#define RB_MAX(name, x) CONCAT(name,_RB_MINMAX(x, RB_INF)) + +#define RB_FOREACH(x, name, head) \ + for ((x) = RB_MIN(name, head); (x) != NULL; (x) = name##_RB_NEXT(x)) + +#define RB_FOREACH_FROM(x, name, y) \ + for ((x) = (y); ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); \ + (x) = (y)) + +#define RB_FOREACH_SAFE(x, name, head, y) \ + for ((x) = RB_MIN(name, head); \ + ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); (x) = (y)) + +#define RB_FOREACH_REVERSE(x, name, head) \ + for ((x) = RB_MAX(name, head); (x) != NULL; (x) = name##_RB_PREV(x)) + +#define RB_FOREACH_REVERSE_FROM(x, name, y) \ + for ((x) = (y); ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \ + (x) = (y)) + +#define RB_FOREACH_REVERSE_SAFE(x, name, head, y) \ + for ((x) = RB_MAX(name, head); \ + ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); (x) = (y)) + +#endif /* !_TREE_H_ */ diff --git a/semestr-5/so/lista4/pipeline.log b/semestr-5/so/lista4/pipeline.log new file mode 100644 index 0000000..b1d1147 --- /dev/null +++ b/semestr-5/so/lista4/pipeline.log @@ -0,0 +1,3415 @@ +DASH execve("/usr/bin/dash", ["dash"], 0x7ffe16b4dba8 /* 40 vars */) = 0 +DASH brk(NULL) = 0x55702b5a3000 +DASH arch_prctl(0x3001 /* ARCH_??? */, 0x7ffd6d776fe0) = -1 EINVAL (Invalid argument) +DASH access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) +DASH openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 +DASH newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=92088, ...}, AT_EMPTY_PATH) = 0 +DASH mmap(NULL, 92088, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fb1c2e11000 +DASH close(3) = 0 +DASH openat(AT_FDCWD, "/usr/lib/libedit.so.0", O_RDONLY|O_CLOEXEC) = 3 +DASH read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \220\0\0\0\0\0\0"..., 832) = 832 +DASH newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=223144, ...}, AT_EMPTY_PATH) = 0 +DASH mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb1c2e0f000 +DASH mmap(NULL, 240792, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fb1c2dd4000 +DASH mprotect(0x7fb1c2ddd000, 180224, PROT_NONE) = 0 +DASH mmap(0x7fb1c2ddd000, 118784, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9000) = 0x7fb1c2ddd000 +DASH mmap(0x7fb1c2dfa000, 57344, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7fb1c2dfa000 +DASH mmap(0x7fb1c2e09000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x34000) = 0x7fb1c2e09000 +DASH mmap(0x7fb1c2e0c000, 11416, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fb1c2e0c000 +DASH close(3) = 0 +DASH openat(AT_FDCWD, "/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 +DASH read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`|\2\0\0\0\0\0"..., 832) = 832 +DASH pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784 +DASH pread64(3, "\4\0\0\0@\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0"..., 80, 848) = 80 +DASH pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0K@g7\5w\10\300\344\306B4Zp\0\1\0\0\0 p\1\0\0\0\0\0"..., 832) = 832 +DASH newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=453688, ...}, AT_EMPTY_PATH) = 0 +DASH mmap(NULL, 457976, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fb1c2b98000 +DASH mmap(0x7fb1c2baf000, 241664, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7fb1c2baf000 +DASH mmap(0x7fb1c2bea000, 98304, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x52000) = 0x7fb1c2bea000 +DASH mmap(0x7fb1c2c02000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x69000) = 0x7fb1c2c02000 +DASH close(3) = 0 +DASH mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb1c2b95000 +DASH arch_prctl(ARCH_SET_FS, 0x7fb1c2b95740) = 0 +DASH mprotect(0x7fb1c2dc5000, 12288, PROT_READ) = 0 +DASH mprotect(0x7fb1c2c02000, 20480, PROT_READ) = 0 +DASH mprotect(0x7fb1c2e09000, 8192, PROT_READ) = 0 +DASH mprotect(0x55702b415000, 8192, PROT_READ) = 0 +DASH mprotect(0x7fb1c2e56000, 8192, PROT_READ) = 0 +DASH munmap(0x7fb1c2e11000, 92088) = 0 +DASH getpid() = DASH +DASH rt_sigaction(SIGCHLD, {sa_handler=0x55702b40ad40, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7fb1c2c44da0}, NULL, 8) = 0 +DASH geteuid() = 1000 +DASH brk(NULL) = 0x55702b5a3000 +DASH brk(0x55702b5c4000) = 0x55702b5c4000 +DASH getppid() = 78697 +DASH newfstatat(AT_FDCWD, "/home/framal/Documents/wmiuwr/semestr-5/so/lista4", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0 +DASH newfstatat(AT_FDCWD, ".", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0 +DASH ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0 +DASH ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0 +DASH rt_sigaction(SIGINT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 +DASH rt_sigaction(SIGINT, {sa_handler=0x55702b40ad40, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7fb1c2c44da0}, NULL, 8) = 0 +DASH rt_sigaction(SIGQUIT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 +DASH rt_sigaction(SIGQUIT, {sa_handler=SIG_IGN, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7fb1c2c44da0}, NULL, 8) = 0 +DASH rt_sigaction(SIGTERM, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 +DASH rt_sigaction(SIGTERM, {sa_handler=SIG_IGN, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7fb1c2c44da0}, NULL, 8) = 0 +DASH openat(AT_FDCWD, "/dev/tty", O_RDWR) = 3 +DASH fcntl(3, F_DUPFD, 10) = 10 +DASH close(3) = 0 +DASH fcntl(10, F_SETFD, FD_CLOEXEC) = 0 +DASH ioctl(10, TIOCGPGRP, [78697]) = 0 +DASH getpgrp() = 78697 +DASH rt_sigaction(SIGTSTP, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 +DASH rt_sigaction(SIGTSTP, {sa_handler=SIG_IGN, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7fb1c2c44da0}, NULL, 8) = 0 +DASH rt_sigaction(SIGTTOU, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 +DASH rt_sigaction(SIGTTOU, {sa_handler=SIG_IGN, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7fb1c2c44da0}, NULL, 8) = 0 +DASH rt_sigaction(SIGTTIN, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 +DASH rt_sigaction(SIGTTIN, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7fb1c2c44da0}, NULL, 8) = 0 +DASH setpgid(0, DASH) = 0 +DASH ioctl(10, TIOCSPGRP, [DASH]) = 0 +DASH newfstatat(AT_FDCWD, "/var/spool/mail/framal", 0x7ffd6d776ec0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/frama", 0x7ffd6d776ec0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/fram", 0x7ffd6d776ec0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/fra", 0x7ffd6d776ec0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/fr", 0x7ffd6d776ec0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/f", 0x7ffd6d776ec0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}, 0) = 0 +DASH newfstatat(AT_FDCWD, "/var/spool/mail", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}, 0) = 0 +DASH newfstatat(AT_FDCWD, "/var/spool/mai", 0x7ffd6d776ec0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/ma", 0x7ffd6d776ec0, 0) = -1 ENOENT (No such file or directory) +DASH write(2, "$ ", 2) = 2 +DASH read(0, "ps -ef | grep sh | wc -l > cnt\n", 8192) = 31 +DASH newfstatat(AT_FDCWD, "/home/framal/.scripts/ps", 0x7ffd6d776e00, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/home/framal/.local/bin/ps", 0x7ffd6d776e00, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/usr/local/bin/ps", 0x7ffd6d776e00, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/usr/bin/ps", {st_mode=S_IFREG|0755, st_size=137504, ...}, 0) = 0 +DASH pipe([3, 4]) = 0 +DASH clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fb1c2b95a10) = PS +PS getpid( +DASH setpgid(PS, PS +PS <... getpid resumed>) = PS +DASH <... setpgid resumed>) = 0 +PS setpgid(0, PS) = 0 +DASH close(4) = 0 +PS ioctl(10, TIOCSPGRP, [PS] +DASH newfstatat(AT_FDCWD, "/home/framal/.scripts/grep", +PS <... ioctl resumed>) = 0 +DASH <... newfstatat resumed>0x7ffd6d776e00, 0) = -1 ENOENT (No such file or directory) +PS rt_sigaction(SIGTSTP, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7fb1c2c44da0}, +DASH newfstatat(AT_FDCWD, "/home/framal/.local/bin/grep", +PS <... rt_sigaction resumed>NULL, 8) = 0 +DASH <... newfstatat resumed>0x7ffd6d776e00, 0) = -1 ENOENT (No such file or directory) +PS rt_sigaction(SIGTTOU, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7fb1c2c44da0}, +DASH newfstatat(AT_FDCWD, "/usr/local/bin/grep", +PS <... rt_sigaction resumed>NULL, 8) = 0 +DASH <... newfstatat resumed>0x7ffd6d776e00, 0) = -1 ENOENT (No such file or directory) +PS rt_sigaction(SIGINT, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7fb1c2c44da0}, +DASH newfstatat(AT_FDCWD, "/usr/bin/grep", +PS <... rt_sigaction resumed>NULL, 8) = 0 +DASH <... newfstatat resumed>{st_mode=S_IFREG|0755, st_size=235824, ...}, 0) = 0 +PS rt_sigaction(SIGQUIT, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7fb1c2c44da0}, +DASH pipe( +PS <... rt_sigaction resumed>NULL, 8) = 0 +DASH <... pipe resumed>[4, 5]) = 0 +PS rt_sigaction(SIGTERM, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7fb1c2c44da0}, +DASH clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD +PS <... rt_sigaction resumed>NULL, 8) = 0 +PS close(3) = 0 +PS dup2(4, 1) = 1 +DASH <... clone resumed>, child_tidptr=0x7fb1c2b95a10) = GREP +PS close(4 +DASH setpgid(GREP, PS +GREP setpgid(0, PS +DASH <... setpgid resumed>) = 0 +PS <... close resumed>) = 0 +GREP <... setpgid resumed>) = 0 +DASH close(3 +GREP ioctl(10, TIOCSPGRP, [PS] +DASH <... close resumed>) = 0 +PS execve("/usr/bin/ps", ["ps", "-ef"], 0x55702b5a3be0 /* 40 vars */ +DASH close(5 +GREP <... ioctl resumed>) = 0 +DASH <... close resumed>) = 0 +GREP rt_sigaction(SIGTSTP, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7fb1c2c44da0}, +DASH newfstatat(AT_FDCWD, "/home/framal/.scripts/wc", +GREP <... rt_sigaction resumed>NULL, 8) = 0 +DASH <... newfstatat resumed>0x7ffd6d776e00, 0) = -1 ENOENT (No such file or directory) +GREP rt_sigaction(SIGTTOU, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7fb1c2c44da0}, +DASH newfstatat(AT_FDCWD, "/home/framal/.local/bin/wc", +GREP <... rt_sigaction resumed>NULL, 8) = 0 +DASH <... newfstatat resumed>0x7ffd6d776e00, 0) = -1 ENOENT (No such file or directory) +GREP rt_sigaction(SIGINT, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7fb1c2c44da0}, +DASH newfstatat(AT_FDCWD, "/usr/local/bin/wc", +GREP <... rt_sigaction resumed>NULL, 8) = 0 +DASH <... newfstatat resumed>0x7ffd6d776e00, 0) = -1 ENOENT (No such file or directory) +GREP rt_sigaction(SIGQUIT, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7fb1c2c44da0}, +DASH newfstatat(AT_FDCWD, "/usr/bin/wc", +GREP <... rt_sigaction resumed>NULL, 8) = 0 +DASH <... newfstatat resumed>{st_mode=S_IFREG|0755, st_size=51400, ...}, 0) = 0 +GREP rt_sigaction(SIGTERM, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7fb1c2c44da0}, +DASH clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD +PS <... execve resumed>) = 0 +GREP <... rt_sigaction resumed>NULL, 8) = 0 +GREP close(4) = 0 +GREP dup2(3, 0 +PS brk(NULL +GREP <... dup2 resumed>) = 0 +PS <... brk resumed>) = 0x5599d4d63000 +DASH <... clone resumed>, child_tidptr=0x7fb1c2b95a10) = WC +GREP close(3 +DASH setpgid(WC, PS +WC setpgid(0, PS +DASH <... setpgid resumed>) = 0 +GREP <... close resumed>) = 0 +WC <... setpgid resumed>) = 0 +PS arch_prctl(0x3001 /* ARCH_??? */, 0x7ffe1a0821c0 +DASH close(4 +WC ioctl(10, TIOCSPGRP, [PS] +GREP dup2(5, 1 +PS <... arch_prctl resumed>) = -1 EINVAL (Invalid argument) +DASH <... close resumed>) = 0 +WC <... ioctl resumed>) = 0 +GREP <... dup2 resumed>) = 1 +DASH close(-1 +WC rt_sigaction(SIGTSTP, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7fb1c2c44da0}, +DASH <... close resumed>) = -1 EBADF (Bad file descriptor) +GREP close(5 +WC <... rt_sigaction resumed>NULL, 8) = 0 +PS access("/etc/ld.so.preload", R_OK +DASH wait4(-1, +WC rt_sigaction(SIGTTOU, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7fb1c2c44da0}, +GREP <... close resumed>) = 0 +WC <... rt_sigaction resumed>NULL, 8) = 0 +PS <... access resumed>) = -1 ENOENT (No such file or directory) +WC rt_sigaction(SIGINT, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7fb1c2c44da0}, +GREP execve("/usr/bin/grep", ["grep", "sh"], 0x55702b5a3be0 /* 40 vars */ +WC <... rt_sigaction resumed>NULL, 8) = 0 +PS openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC +WC rt_sigaction(SIGQUIT, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7fb1c2c44da0}, +PS <... openat resumed>) = 3 +WC <... rt_sigaction resumed>NULL, 8) = 0 +PS newfstatat(3, "", +WC rt_sigaction(SIGTERM, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7fb1c2c44da0}, +PS <... newfstatat resumed>{st_mode=S_IFREG|0644, st_size=92088, ...}, AT_EMPTY_PATH) = 0 +WC <... rt_sigaction resumed>NULL, 8) = 0 +PS mmap(NULL, 92088, PROT_READ, MAP_PRIVATE, 3, 0 +WC dup2(4, 0 +PS <... mmap resumed>) = 0x7f6ac3dcc000 +WC <... dup2 resumed>) = 0 +PS close(3 +WC close(4) = 0 +PS <... close resumed>) = 0 +GREP <... execve resumed>) = 0 +WC openat(AT_FDCWD, "cnt", O_WRONLY|O_CREAT|O_TRUNC, 0666 +PS openat(AT_FDCWD, "/usr/lib/libprocps.so.8", O_RDONLY|O_CLOEXEC) = 3 +GREP brk(NULL +PS read(3, +GREP <... brk resumed>) = 0x55b8b6756000 +WC <... openat resumed>) = 3 +PS <... read resumed>"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 P\0\0\0\0\0\0"..., 832) = 832 +WC fcntl(1, F_DUPFD, 10 +GREP arch_prctl(0x3001 /* ARCH_??? */, 0x7ffe3e432c70 +WC <... fcntl resumed>) = 11 +PS newfstatat(3, "", +GREP <... arch_prctl resumed>) = -1 EINVAL (Invalid argument) +WC close(1 +PS <... newfstatat resumed>{st_mode=S_IFREG|0755, st_size=83848, ...}, AT_EMPTY_PATH) = 0 +WC <... close resumed>) = 0 +GREP access("/etc/ld.so.preload", R_OK +WC fcntl(11, F_SETFD, FD_CLOEXEC +PS mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 +WC <... fcntl resumed>) = 0 +GREP <... access resumed>) = -1 ENOENT (No such file or directory) +WC dup2(3, 1 +PS <... mmap resumed>) = 0x7f6ac3dca000 +WC <... dup2 resumed>) = 1 +GREP openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC +WC close(3 +PS mmap(NULL, 229408, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0 +WC <... close resumed>) = 0 +GREP <... openat resumed>) = 3 +WC execve("/usr/bin/wc", ["wc", "-l"], 0x55702b5a3bf8 /* 40 vars */ +PS <... mmap resumed>) = 0x7f6ac3d91000 +GREP newfstatat(3, "", +PS mmap(0x7f6ac3d96000, 40960, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5000 +GREP <... newfstatat resumed>{st_mode=S_IFREG|0644, st_size=92088, ...}, AT_EMPTY_PATH) = 0 +PS <... mmap resumed>) = 0x7f6ac3d96000 +GREP mmap(NULL, 92088, PROT_READ, MAP_PRIVATE, 3, 0 +PS mmap(0x7f6ac3da0000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf000 +GREP <... mmap resumed>) = 0x7fae184ec000 +PS <... mmap resumed>) = 0x7f6ac3da0000 +GREP close(3 +PS mmap(0x7f6ac3da4000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12000 +GREP <... close resumed>) = 0 +PS <... mmap resumed>) = 0x7f6ac3da4000 +GREP openat(AT_FDCWD, "/usr/lib/libpcre.so.1", O_RDONLY|O_CLOEXEC +PS mmap(0x7f6ac3da7000, 139296, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0 +GREP <... openat resumed>) = 3 +WC <... execve resumed>) = 0 +PS <... mmap resumed>) = 0x7f6ac3da7000 +GREP read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \0\0\0\0\0\0"..., 832) = 832 +PS close(3 +WC brk(NULL +GREP newfstatat(3, "", +PS <... close resumed>) = 0 +WC <... brk resumed>) = 0x562518c9a000 +GREP <... newfstatat resumed>{st_mode=S_IFREG|0755, st_size=481072, ...}, AT_EMPTY_PATH) = 0 +PS openat(AT_FDCWD, "/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC +WC arch_prctl(0x3001 /* ARCH_??? */, 0x7fff61b656c0 +GREP mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 +WC <... arch_prctl resumed>) = -1 EINVAL (Invalid argument) +PS <... openat resumed>) = 3 +GREP <... mmap resumed>) = 0x7fae184ea000 +PS read(3, +GREP mmap(NULL, 483592, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0 +WC access("/etc/ld.so.preload", R_OK +PS <... read resumed>"\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`|\2\0\0\0\0\0"..., 832) = 832 +WC <... access resumed>) = -1 ENOENT (No such file or directory) +GREP <... mmap resumed>) = 0x7fae18473000 +PS pread64(3, +WC openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC +GREP mmap(0x7fae18475000, 352256, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000 +PS <... pread64 resumed>"\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784 +WC <... openat resumed>) = 3 +GREP <... mmap resumed>) = 0x7fae18475000 +PS pread64(3, +WC newfstatat(3, "", +GREP mmap(0x7fae184cb000, 118784, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x58000 +PS <... pread64 resumed>"\4\0\0\0@\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0"..., 80, 848) = 80 +WC <... newfstatat resumed>{st_mode=S_IFREG|0644, st_size=92088, ...}, AT_EMPTY_PATH) = 0 +GREP <... mmap resumed>) = 0x7fae184cb000 +PS pread64(3, +WC mmap(NULL, 92088, PROT_READ, MAP_PRIVATE, 3, 0 +GREP mmap(0x7fae184e8000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x74000 +PS <... pread64 resumed>"\4\0\0\0\24\0\0\0\3\0\0\0GNU\0K@g7\5w\10\300\344\306B4Zp) = 0x7f014c745000 +GREP <... mmap resumed>) = 0x7fae184e8000 +WC close(3 +PS newfstatat(3, "", +WC <... close resumed>) = 0 +GREP close(3 +PS <... newfstatat resumed>{st_mode=S_IFREG|0755, st_size=2150424, ...}, AT_EMPTY_PATH) = 0 +WC openat(AT_FDCWD, "/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC +GREP <... close resumed>) = 0 +WC <... openat resumed>) = 3 +PS pread64(3, +WC read(3, +GREP openat(AT_FDCWD, "/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC +WC <... read resumed>"\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`|\2\0\0\0\0\0"..., 832) = 832 +PS <... pread64 resumed>"\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784 +WC pread64(3, +GREP <... openat resumed>) = 3 +WC <... pread64 resumed>"\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784 +PS mmap(NULL, 1880536, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0 +GREP read(3, +WC pread64(3, +PS <... mmap resumed>) = 0x7f6ac3bc5000 +WC <... pread64 resumed>"\4\0\0\0@\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0"..., 80, 848) = 80 +GREP <... read resumed>"\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`|\2\0\0\0\0\0"..., 832) = 832 +WC pread64(3, +PS mmap(0x7f6ac3beb000, 1355776, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000 +WC <... pread64 resumed>"\4\0\0\0\24\0\0\0\3\0\0\0GNU\0K@g7\5w\10\300\344\306B4Zp +WC newfstatat(3, "", +PS <... mmap resumed>) = 0x7f6ac3beb000 +WC <... newfstatat resumed>{st_mode=S_IFREG|0755, st_size=2150424, ...}, AT_EMPTY_PATH) = 0 +GREP <... pread64 resumed>"\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784 +WC mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 +PS mmap(0x7f6ac3d36000, 311296, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x171000 +WC <... mmap resumed>) = 0x7f014c743000 +GREP pread64(3, +WC pread64(3, +PS <... mmap resumed>) = 0x7f6ac3d36000 +WC <... pread64 resumed>"\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784 +GREP <... pread64 resumed>"\4\0\0\0@\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0"..., 80, 848) = 80 +WC mmap(NULL, 1880536, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0 +PS mmap(0x7f6ac3d82000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bc000 +WC <... mmap resumed>) = 0x7f014c577000 +GREP pread64(3, +WC mmap(0x7f014c59d000, 1355776, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000 +PS <... mmap resumed>) = 0x7f6ac3d82000 +GREP <... pread64 resumed>"\4\0\0\0\24\0\0\0\3\0\0\0GNU\0K@g7\5w\10\300\344\306B4Zp) = 0x7f014c59d000 +PS mmap(0x7f6ac3d88000, 33240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0 +WC mmap(0x7f014c6e8000, 311296, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x171000 +GREP newfstatat(3, "", +WC <... mmap resumed>) = 0x7f014c6e8000 +GREP <... newfstatat resumed>{st_mode=S_IFREG|0755, st_size=2150424, ...}, AT_EMPTY_PATH) = 0 +WC mmap(0x7f014c734000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bc000 +PS <... mmap resumed>) = 0x7f6ac3d88000 +WC <... mmap resumed>) = 0x7f014c734000 +GREP pread64(3, +WC mmap(0x7f014c73a000, 33240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0 +GREP <... pread64 resumed>"\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784 +PS close(3 +WC <... mmap resumed>) = 0x7f014c73a000 +GREP mmap(NULL, 1880536, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0 +PS <... close resumed>) = 0 +WC close(3 +GREP <... mmap resumed>) = 0x7fae182a7000 +WC <... close resumed>) = 0 +PS openat(AT_FDCWD, "/usr/lib/libsystemd.so.0", O_RDONLY|O_CLOEXEC +GREP mmap(0x7fae182cd000, 1355776, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000 +WC mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 +PS <... openat resumed>) = 3 +GREP <... mmap resumed>) = 0x7fae182cd000 +PS read(3, +GREP mmap(0x7fae18418000, 311296, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x171000 +PS <... read resumed>"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@@\1\0\0\0\0\0"..., 832) = 832 +WC <... mmap resumed>) = 0x7f014c575000 +GREP <... mmap resumed>) = 0x7fae18418000 +PS newfstatat(3, "", +WC arch_prctl(ARCH_SET_FS, 0x7f014c744600 +GREP mmap(0x7fae18464000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bc000 +WC <... arch_prctl resumed>) = 0 +PS <... newfstatat resumed>{st_mode=S_IFREG|0755, st_size=799560, ...}, AT_EMPTY_PATH) = 0 +GREP <... mmap resumed>) = 0x7fae18464000 +PS mmap(NULL, 804192, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0 +GREP mmap(0x7fae1846a000, 33240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0 +PS <... mmap resumed>) = 0x7f6ac3b00000 +GREP <... mmap resumed>) = 0x7fae1846a000 +PS mmap(0x7f6ac3b14000, 507904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14000 +WC mprotect(0x7f014c734000, 12288, PROT_READ +GREP close(3 +WC <... mprotect resumed>) = 0 +PS <... mmap resumed>) = 0x7f6ac3b14000 +GREP <... close resumed>) = 0 +PS mmap(0x7f6ac3b90000, 180224, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x90000 +GREP openat(AT_FDCWD, "/usr/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC +WC mprotect(0x562518938000, 4096, PROT_READ +PS <... mmap resumed>) = 0x7f6ac3b90000 +WC <... mprotect resumed>) = 0 +GREP <... openat resumed>) = 3 +WC mprotect(0x7f014c78a000, 8192, PROT_READ +PS mmap(0x7f6ac3bbc000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xbb000 +GREP read(3, +WC <... mprotect resumed>) = 0 +PS <... mmap resumed>) = 0x7f6ac3bbc000 +GREP <... read resumed>"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\200\0\0\0\0\0\0"..., 832) = 832 +WC munmap(0x7f014c745000, 92088 +PS mmap(0x7f6ac3bc4000, 1376, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0 +GREP pread64(3, +WC <... munmap resumed>) = 0 +PS <... mmap resumed>) = 0x7f6ac3bc4000 +GREP <... pread64 resumed>"\4\0\0\0@\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0"..., 80, 792) = 80 +PS close(3 +WC brk(NULL +GREP pread64(3, +PS <... close resumed>) = 0 +WC <... brk resumed>) = 0x562518c9a000 +GREP <... pread64 resumed>"\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\7\310\371[O2Q\320\205P!z\330\241\363\20"..., 68, 872) = 68 +WC brk(0x562518cbb000 +PS openat(AT_FDCWD, "/usr/lib/libdl.so.2", O_RDONLY|O_CLOEXEC +GREP newfstatat(3, "", +WC <... brk resumed>) = 0x562518cbb000 +GREP <... newfstatat resumed>{st_mode=S_IFREG|0755, st_size=154040, ...}, AT_EMPTY_PATH) = 0 +PS <... openat resumed>) = 3 +WC openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC +GREP mmap(NULL, 131472, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0 +PS read(3, +WC <... openat resumed>) = 3 +GREP <... mmap resumed>) = 0x7fae18286000 +PS <... read resumed>"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\"\0\0\0\0\0\0"..., 832) = 832 +WC newfstatat(3, "", +GREP mprotect(0x7fae1828d000, 81920, PROT_NONE +WC <... newfstatat resumed>{st_mode=S_IFREG|0644, st_size=3362224, ...}, AT_EMPTY_PATH) = 0 +PS newfstatat(3, "", +WC mmap(NULL, 3362224, PROT_READ, MAP_PRIVATE, 3, 0 +GREP <... mprotect resumed>) = 0 +WC <... mmap resumed>) = 0x7f014c240000 +PS <... newfstatat resumed>{st_mode=S_IFREG|0755, st_size=22704, ...}, AT_EMPTY_PATH) = 0 +WC close(3 +GREP mmap(0x7fae1828d000, 61440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000 +WC <... close resumed>) = 0 +PS mmap(NULL, 24720, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0 +GREP <... mmap resumed>) = 0x7fae1828d000 +PS <... mmap resumed>) = 0x7f6ac3af9000 +GREP mmap(0x7fae1829c000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000 +PS mmap(0x7f6ac3afb000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000 +GREP <... mmap resumed>) = 0x7fae1829c000 +WC openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC +PS <... mmap resumed>) = 0x7f6ac3afb000 +WC <... openat resumed>) = 3 +GREP mmap(0x7fae182a1000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a000 +PS mmap(0x7f6ac3afd000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4000 +WC newfstatat(3, "", +GREP <... mmap resumed>) = 0x7fae182a1000 +WC <... newfstatat resumed>{st_mode=S_IFREG|0644, st_size=2998, ...}, AT_EMPTY_PATH) = 0 +PS <... mmap resumed>) = 0x7f6ac3afd000 +WC read(3, +GREP mmap(0x7fae182a3000, 12688, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0 +WC <... read resumed>"# Locale name alias data base.\n#"..., 4096) = 2998 +PS mmap(0x7f6ac3afe000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4000 +GREP <... mmap resumed>) = 0x7fae182a3000 +WC read(3, +PS <... mmap resumed>) = 0x7f6ac3afe000 +WC <... read resumed>"", 4096) = 0 +GREP close(3 +WC close(3 +PS close(3 +WC <... close resumed>) = 0 +GREP <... close resumed>) = 0 +PS <... close resumed>) = 0 +WC openat(AT_FDCWD, "/usr/share/locale/en_US.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY +PS openat(AT_FDCWD, "/usr/lib/librt.so.1", O_RDONLY|O_CLOEXEC +GREP mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 +WC <... openat resumed>) = -1 ENOENT (No such file or directory) +PS <... openat resumed>) = 3 +WC openat(AT_FDCWD, "/usr/share/locale/en_US.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY +GREP <... mmap resumed>) = 0x7fae18283000 +WC <... openat resumed>) = -1 ENOENT (No such file or directory) +PS read(3, +WC openat(AT_FDCWD, "/usr/share/locale/en_US/LC_MESSAGES/coreutils.mo", O_RDONLY +GREP arch_prctl(ARCH_SET_FS, 0x7fae18283740 +WC <... openat resumed>) = -1 ENOENT (No such file or directory) +PS <... read resumed>"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\2207\0\0\0\0\0\0"..., 832) = 832 +GREP <... arch_prctl resumed>) = 0 +WC openat(AT_FDCWD, "/usr/share/locale/en.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY +PS newfstatat(3, "", +WC <... openat resumed>) = -1 ENOENT (No such file or directory) +PS <... newfstatat resumed>{st_mode=S_IFREG|0755, st_size=39408, ...}, AT_EMPTY_PATH) = 0 +WC openat(AT_FDCWD, "/usr/share/locale/en.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY +PS mmap(NULL, 43520, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0 +WC <... openat resumed>) = -1 ENOENT (No such file or directory) +GREP mprotect(0x7fae18464000, 12288, PROT_READ +WC openat(AT_FDCWD, "/usr/share/locale/en/LC_MESSAGES/coreutils.mo", O_RDONLY +PS <... mmap resumed>) = 0x7f6ac3aee000 +WC <... openat resumed>) = -1 ENOENT (No such file or directory) +GREP <... mprotect resumed>) = 0 +WC fadvise64(0, 0, 0, POSIX_FADV_SEQUENTIAL +PS mmap(0x7f6ac3af1000, 16384, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000 +WC <... fadvise64 resumed>) = -1 ESPIPE (Illegal seek) +WC read(0, +GREP mprotect(0x7fae182a1000, 4096, PROT_READ +PS <... mmap resumed>) = 0x7f6ac3af1000 +GREP <... mprotect resumed>) = 0 +PS mmap(0x7f6ac3af5000, 8192, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000 +GREP mprotect(0x7fae184e8000, 4096, PROT_READ +PS <... mmap resumed>) = 0x7f6ac3af5000 +GREP <... mprotect resumed>) = 0 +PS mmap(0x7f6ac3af7000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0x7f6ac3af7000 +GREP mprotect(0x55b8b4ab3000, 8192, PROT_READ +PS close(3 +GREP <... mprotect resumed>) = 0 +PS <... close resumed>) = 0 +GREP mprotect(0x7fae18531000, 8192, PROT_READ +PS openat(AT_FDCWD, "/usr/lib/liblzma.so.5", O_RDONLY|O_CLOEXEC +GREP <... mprotect resumed>) = 0 +PS <... openat resumed>) = 3 +PS read(3, +GREP munmap(0x7fae184ec000, 92088 +PS <... read resumed>"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 0\0\0\0\0\0\0"..., 832) = 832 +PS newfstatat(3, "", +GREP <... munmap resumed>) = 0 +PS <... newfstatat resumed>{st_mode=S_IFREG|0755, st_size=161624, ...}, AT_EMPTY_PATH) = 0 +GREP set_tid_address(0x7fae18283a10 +PS mmap(NULL, 163856, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0 +GREP <... set_tid_address resumed>) = GREP +PS <... mmap resumed>) = 0x7f6ac3ac5000 +GREP set_robust_list(0x7fae18283a20, 24 +PS mprotect(0x7f6ac3ac8000, 147456, PROT_NONE +GREP <... set_robust_list resumed>) = 0 +PS <... mprotect resumed>) = 0 +GREP rt_sigaction(SIGRTMIN, {sa_handler=0x7fae1828db70, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7fae18299870}, +PS mmap(0x7f6ac3ac8000, 98304, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000 +GREP <... rt_sigaction resumed>NULL, 8) = 0 +PS <... mmap resumed>) = 0x7f6ac3ac8000 +GREP rt_sigaction(SIGRT_1, {sa_handler=0x7fae1828dc10, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO, sa_restorer=0x7fae18299870}, +PS mmap(0x7f6ac3ae0000, 45056, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b000 +GREP <... rt_sigaction resumed>NULL, 8) = 0 +PS <... mmap resumed>) = 0x7f6ac3ae0000 +GREP rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], +PS mmap(0x7f6ac3aec000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000 +GREP <... rt_sigprocmask resumed>NULL, 8) = 0 +PS <... mmap resumed>) = 0x7f6ac3aec000 +GREP prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 +PS close(3) = 0 +PS openat(AT_FDCWD, "/usr/lib/libzstd.so.1", O_RDONLY|O_CLOEXEC) = 3 +GREP brk(NULL +PS read(3, +GREP <... brk resumed>) = 0x55b8b6756000 +PS <... read resumed>"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@P\0\0\0\0\0\0"..., 832) = 832 +GREP brk(0x55b8b6777000 +PS newfstatat(3, "", +GREP <... brk resumed>) = 0x55b8b6777000 +PS <... newfstatat resumed>{st_mode=S_IFREG|0755, st_size=1103632, ...}, AT_EMPTY_PATH) = 0 +GREP openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC +PS mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 +GREP <... openat resumed>) = 3 +PS <... mmap resumed>) = 0x7f6ac3ac3000 +GREP newfstatat(3, "", +PS mmap(NULL, 1105976, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0 +GREP <... newfstatat resumed>{st_mode=S_IFREG|0644, st_size=3362224, ...}, AT_EMPTY_PATH) = 0 +PS <... mmap resumed>) = 0x7f6ac39b4000 +GREP mmap(NULL, 3362224, PROT_READ, MAP_PRIVATE, 3, 0 +PS mprotect(0x7f6ac39b9000, 1081344, PROT_NONE +GREP <... mmap resumed>) = 0x7fae17f4e000 +PS <... mprotect resumed>) = 0 +GREP close(3 +PS mmap(0x7f6ac39b9000, 999424, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5000 +GREP <... close resumed>) = 0 +PS <... mmap resumed>) = 0x7f6ac39b9000 +PS mmap(0x7f6ac3aad000, 77824, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf9000 +GREP openat(AT_FDCWD, "/usr/lib/gconv/gconv-modules.cache", O_RDONLY +PS <... mmap resumed>) = 0x7f6ac3aad000 +GREP <... openat resumed>) = -1 ENOENT (No such file or directory) +PS mmap(0x7f6ac3ac1000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10c000 +GREP openat(AT_FDCWD, "/usr/lib/gconv/gconv-modules", O_RDONLY|O_CLOEXEC +PS <... mmap resumed>) = 0x7f6ac3ac1000 +GREP <... openat resumed>) = 3 +GREP newfstatat(3, "", +PS close(3 +GREP <... newfstatat resumed>{st_mode=S_IFREG|0644, st_size=56353, ...}, AT_EMPTY_PATH) = 0 +PS <... close resumed>) = 0 +GREP read(3, +PS openat(AT_FDCWD, "/usr/lib/liblz4.so.1", O_RDONLY|O_CLOEXEC +GREP <... read resumed>"# GNU libc iconv configuration.\n"..., 4096) = 4096 +PS <... openat resumed>) = 3 +PS read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 0\0\0\0\0\0\0"..., 832) = 832 +PS newfstatat(3, "", +GREP read(3, +PS <... newfstatat resumed>{st_mode=S_IFREG|0755, st_size=136968, ...}, AT_EMPTY_PATH) = 0 +GREP <... read resumed>"B1002//\tJUS_I.B1.002//\nmodule\tJU"..., 4096) = 4096 +PS mmap(NULL, 139280, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f6ac3991000 +PS mmap(0x7f6ac3994000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f6ac3994000 +GREP read(3, +PS mmap(0x7f6ac39af000, 12288, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000 +GREP <... read resumed>"\tISO-IR-110//\t\tISO-8859-4//\nalia"..., 4096) = 4096 +PS <... mmap resumed>) = 0x7f6ac39af000 +PS mmap(0x7f6ac39b2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x20000) = 0x7f6ac39b2000 +PS close(3) = 0 +GREP read(3, +PS openat(AT_FDCWD, "/usr/lib/libcap.so.2", O_RDONLY|O_CLOEXEC +GREP <... read resumed>"\t\t\tISO-8859-14//\nalias\tISO_8859-"..., 4096) = 4096 +PS <... openat resumed>) = 3 +PS read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0i\0\0\0\0\0\0"..., 832) = 832 +PS pread64(3, "\4\0\0\0 \0\0\0\5\0\0\0GNU\0\1\0\1\300\4\0\0\0\t\0\0\0\0\0\0\0"..., 48, 792) = 48 +GREP read(3, +PS pread64(3, +GREP <... read resumed>"DIC-ES//\nalias\tEBCDICES//\t\tEBCDI"..., 4096) = 4096 +PS <... pread64 resumed>"\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\301gO\220\202\376\335AXv\271\367\331q\"i"..., 36, 840) = 36 +PS newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=38776, ...}, AT_EMPTY_PATH) = 0 +PS mmap(NULL, 41024, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f6ac3986000 +PS mmap(0x7f6ac3989000, 16384, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000 +GREP read(3, +PS <... mmap resumed>) = 0x7f6ac3989000 +GREP <... read resumed>"CDIC-CP-ES//\t\tIBM284//\nalias\tCSI"..., 4096) = 4096 +PS mmap(0x7f6ac398d000, 8192, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7f6ac398d000 +PS mmap(0x7f6ac398f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0x7f6ac398f000 +PS close(3) = 0 +PS openat(AT_FDCWD, "/usr/lib/libgcrypt.so.20", O_RDONLY|O_CLOEXEC +GREP read(3, +PS <... openat resumed>) = 3 +GREP <... read resumed>"\t\tIBM863//\nalias\tOSF1002035F//\t\t"..., 4096) = 4096 +PS read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\360\0\0\0\0\0\0"..., 832) = 832 +PS newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1288016, ...}, AT_EMPTY_PATH) = 0 +GREP read(3, "937//\t\tIBM937//\nmodule\tIBM937//\t"..., 4096) = 4096 +PS mmap(NULL, 1291608, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f6ac384a000 +PS mprotect(0x7f6ac3859000, 1191936, PROT_NONE +GREP read(3, "UJIS//\t\t\tEUC-JP//\nmodule\tEUC-JP/"..., 4096) = 4096 +PS <... mprotect resumed>) = 0 +PS mmap(0x7f6ac3859000, 921600, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf000) = 0x7f6ac3859000 +PS mmap(0x7f6ac393a000, 266240, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf0000) = 0x7f6ac393a000 +PS mmap(0x7f6ac397c000, 40960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x131000) = 0x7f6ac397c000 +GREP read(3, +PS close(3 +GREP <... read resumed>"lias\tISO2022CN//\t\tISO-2022-CN//\n"..., 4096) = 4096 +PS <... close resumed>) = 0 +PS openat(AT_FDCWD, "/usr/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3 +PS read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\200\0\0\0\0\0\0"..., 832) = 832 +PS pread64(3, "\4\0\0\0@\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0"..., 80, 792) = 80 +GREP read(3, +PS pread64(3, +GREP <... read resumed>"O_5427-EXT//\nalias\tISO_5427EXT//"..., 4096) = 4096 +PS <... pread64 resumed>"\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\7\310\371[O2Q\320\205P!z\330\241\363\20"..., 68, 872) = 68 +PS newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=154040, ...}, AT_EMPTY_PATH) = 0 +PS mmap(NULL, 131472, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f6ac3829000 +PS mprotect(0x7f6ac3830000, 81920, PROT_NONE) = 0 +PS mmap(0x7f6ac3830000, 61440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7f6ac3830000 +GREP read(3, +PS mmap(0x7f6ac383f000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000 +GREP <... read resumed>"ost\nmodule\tMAC-SAMI//\t\tINTERNAL\t"..., 4096) = 4096 +PS <... mmap resumed>) = 0x7f6ac383f000 +PS mmap(0x7f6ac3844000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a000) = 0x7f6ac3844000 +PS mmap(0x7f6ac3846000, 12688, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f6ac3846000 +PS close(3) = 0 +PS openat(AT_FDCWD, "/usr/lib/libgpg-error.so.0", O_RDONLY|O_CLOEXEC +GREP read(3, +PS <... openat resumed>) = 3 +GREP <... read resumed>"112//\t\tINTERNAL\t\tIBM1112\t\t1\nmodu"..., 4096) = 4096 +PS read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@P\0\0\0\0\0\0"..., 832) = 832 +PS newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=153648, ...}, AT_EMPTY_PATH) = 0 +PS mmap(NULL, 156112, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0 +GREP brk(0x55b8b6798000 +PS <... mmap resumed>) = 0x7f6ac3802000 +GREP <... brk resumed>) = 0x55b8b6798000 +PS mprotect(0x7f6ac3807000, 131072, PROT_NONE) = 0 +PS mmap(0x7f6ac3807000, 86016, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5000) = 0x7f6ac3807000 +PS mmap(0x7f6ac381c000, 40960, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a000 +GREP read(3, +PS <... mmap resumed>) = 0x7f6ac381c000 +GREP <... read resumed>"s\tCP9448//\t\tIBM9448//\nalias\tCSIB"..., 4096) = 3105 +PS mmap(0x7f6ac3827000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x24000) = 0x7f6ac3827000 +PS close(3) = 0 +PS mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6ac3800000 +GREP read(3, +PS mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 +GREP <... read resumed>"", 4096) = 0 +PS <... mmap resumed>) = 0x7f6ac37fd000 +GREP close(3 +PS arch_prctl(ARCH_SET_FS, 0x7f6ac37fd7c0 +GREP <... close resumed>) = 0 +PS <... arch_prctl resumed>) = 0 +GREP futex(0x7fae184694dc, FUTEX_WAKE_PRIVATE, 2147483647 +PS mprotect(0x7f6ac3d82000, 12288, PROT_READ +GREP <... futex resumed>) = 0 +PS <... mprotect resumed>) = 0 +PS mprotect(0x7f6ac3827000, 4096, PROT_READ) = 0 +PS mprotect(0x7f6ac3844000, 4096, PROT_READ) = 0 +PS mprotect(0x7f6ac397c000, 12288, PROT_READ) = 0 +PS mprotect(0x7f6ac398f000, 4096, PROT_READ) = 0 +PS mprotect(0x7f6ac39b2000, 4096, PROT_READ) = 0 +PS mprotect(0x7f6ac3ac1000, 4096, PROT_READ) = 0 +PS mprotect(0x7f6ac3aec000, 4096, PROT_READ) = 0 +GREP openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3 +PS mprotect(0x7f6ac3af7000, 4096, PROT_READ +GREP newfstatat(3, "", +PS <... mprotect resumed>) = 0 +GREP <... newfstatat resumed>{st_mode=S_IFREG|0644, st_size=2998, ...}, AT_EMPTY_PATH) = 0 +PS mprotect(0x7f6ac3afe000, 4096, PROT_READ +GREP read(3, +PS <... mprotect resumed>) = 0 +GREP <... read resumed>"# Locale name alias data base.\n#"..., 4096) = 2998 +GREP read(3, "", 4096) = 0 +GREP close(3) = 0 +GREP openat(AT_FDCWD, "/usr/share/locale/en_US.UTF-8/LC_MESSAGES/grep.mo", O_RDONLY) = -1 ENOENT (No such file or directory) +GREP openat(AT_FDCWD, "/usr/share/locale/en_US.utf8/LC_MESSAGES/grep.mo", O_RDONLY +PS mprotect(0x7f6ac3bbc000, 28672, PROT_READ +GREP <... openat resumed>) = -1 ENOENT (No such file or directory) +GREP openat(AT_FDCWD, "/usr/share/locale/en_US/LC_MESSAGES/grep.mo", O_RDONLY +PS <... mprotect resumed>) = 0 +GREP <... openat resumed>) = -1 ENOENT (No such file or directory) +GREP openat(AT_FDCWD, "/usr/share/locale/en.UTF-8/LC_MESSAGES/grep.mo", O_RDONLY) = -1 ENOENT (No such file or directory) +PS mprotect(0x7f6ac3da4000, 8192, PROT_READ +GREP openat(AT_FDCWD, "/usr/share/locale/en.utf8/LC_MESSAGES/grep.mo", O_RDONLY +PS <... mprotect resumed>) = 0 +GREP <... openat resumed>) = -1 ENOENT (No such file or directory) +GREP openat(AT_FDCWD, "/usr/share/locale/en/LC_MESSAGES/grep.mo", O_RDONLY) = -1 ENOENT (No such file or directory) +PS mprotect(0x5599d3b01000, 20480, PROT_READ +GREP openat(AT_FDCWD, "/proc/self/maps", O_RDONLY +PS <... mprotect resumed>) = 0 +GREP <... openat resumed>) = 3 +PS mprotect(0x7f6ac3e11000, 8192, PROT_READ +GREP mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 +PS <... mprotect resumed>) = 0 +GREP <... mmap resumed>) = 0x7fae18501000 +GREP lseek(3, 0, SEEK_SET +PS munmap(0x7f6ac3dcc000, 92088 +GREP <... lseek resumed>) = 0 +GREP read(3, +PS <... munmap resumed>) = 0 +PS set_tid_address(0x7f6ac37fda90 +GREP <... read resumed>"55b8b4a7b000-55b8b4a7f000 r--p 0"..., 8192) = 3284 +PS <... set_tid_address resumed>) = PS +GREP read(3, +PS set_robust_list(0x7f6ac37fdaa0, 24 +GREP <... read resumed>"", 4908) = 0 +PS <... set_robust_list resumed>) = 0 +GREP close(3 +PS rt_sigaction(SIGRTMIN, {sa_handler=0x7f6ac3830b70, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7f6ac383c870}, +GREP <... close resumed>) = 0 +PS <... rt_sigaction resumed>NULL, 8) = 0 +GREP munmap(0x7fae18501000, 8192 +PS rt_sigaction(SIGRT_1, {sa_handler=0x7f6ac3830c10, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f6ac383c870}, +GREP <... munmap resumed>) = 0 +PS <... rt_sigaction resumed>NULL, 8) = 0 +GREP sigaltstack({ss_sp=0x55b8b4ab5b00, ss_flags=0, ss_size=65536}, +PS rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], +GREP <... sigaltstack resumed>NULL) = 0 +PS <... rt_sigprocmask resumed>NULL, 8) = 0 +GREP rt_sigaction(SIGSEGV, {sa_handler=0x55b8b4a94d60, sa_mask=[HUP INT QUIT USR1 USR2 PIPE ALRM TERM CHLD URG XCPU XFSZ VTALRM PROF WINCH IO PWR], sa_flags=SA_RESTORER|SA_ONSTACK|SA_SIGINFO, sa_restorer=0x7fae182e3da0}, +PS prlimit64(0, RLIMIT_STACK, NULL, +GREP <... rt_sigaction resumed>NULL, 8) = 0 +PS <... prlimit64 resumed>{rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 +GREP rt_sigaction(SIGSEGV, {sa_handler=0x55b8b4a94d60, sa_mask=[HUP INT QUIT USR1 USR2 PIPE ALRM TERM CHLD URG XCPU XFSZ VTALRM PROF WINCH IO PWR], sa_flags=SA_RESTORER|SA_ONSTACK|SA_SIGINFO, sa_restorer=0x7fae182e3da0}, NULL, 8) = 0 +PS brk(NULL +GREP newfstatat(1, "", +PS <... brk resumed>) = 0x5599d4d63000 +GREP <... newfstatat resumed>{st_mode=S_IFIFO|0600, st_size=0, ...}, AT_EMPTY_PATH) = 0 +PS brk(0x5599d4d84000) = 0x5599d4d84000 +GREP brk(0x55b8b67b9000 +PS prctl(PR_CAPBSET_READ, CAP_MAC_OVERRIDE +GREP <... brk resumed>) = 0x55b8b67b9000 +PS <... prctl resumed>) = 1 +GREP newfstatat(0, "", +PS prctl(PR_CAPBSET_READ, 0x30 /* CAP_??? */ +GREP <... newfstatat resumed>{st_mode=S_IFIFO|0600, st_size=0, ...}, AT_EMPTY_PATH) = 0 +PS <... prctl resumed>) = -1 EINVAL (Invalid argument) +GREP lseek(0, 0, SEEK_CUR +PS prctl(PR_CAPBSET_READ, CAP_CHECKPOINT_RESTORE +GREP <... lseek resumed>) = -1 ESPIPE (Illegal seek) +PS <... prctl resumed>) = 1 +GREP read(0, +PS prctl(PR_CAPBSET_READ, 0x2c /* CAP_??? */) = -1 EINVAL (Invalid argument) +PS prctl(PR_CAPBSET_READ, 0x2a /* CAP_??? */) = -1 EINVAL (Invalid argument) +PS prctl(PR_CAPBSET_READ, 0x29 /* CAP_??? */) = -1 EINVAL (Invalid argument) +PS openat(AT_FDCWD, "/proc/self/auxv", O_RDONLY) = 3 +PS newfstatat(3, "", {st_mode=S_IFREG|0400, st_size=0, ...}, AT_EMPTY_PATH) = 0 +PS read(3, "!\0\0\0\0\0\0\0\0\260\37\32\376\177\0\0003\0\0\0\0\0\0\0\360\7\0\0\0\0\0\0"..., 1024) = 336 +PS close(3) = 0 +PS openat(AT_FDCWD, "/proc/sys/kernel/osrelease", O_RDONLY) = 3 +PS newfstatat(3, "", {st_mode=S_IFREG|0444, st_size=0, ...}, AT_EMPTY_PATH) = 0 +PS read(3, "5.14.15-arch1-1\n", 1024) = 16 +PS close(3) = 0 +PS openat(AT_FDCWD, "/sys/devices/system/cpu/online", O_RDONLY|O_CLOEXEC) = 3 +PS read(3, "0-7\n", 8192) = 4 +PS close(3) = 0 +PS openat(AT_FDCWD, "/proc/self/auxv", O_RDONLY) = 3 +PS newfstatat(3, "", {st_mode=S_IFREG|0400, st_size=0, ...}, AT_EMPTY_PATH) = 0 +PS read(3, "!\0\0\0\0\0\0\0\0\260\37\32\376\177\0\0003\0\0\0\0\0\0\0\360\7\0\0\0\0\0\0"..., 1024) = 336 +PS close(3) = 0 +PS openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3 +PS newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=3362224, ...}, AT_EMPTY_PATH) = 0 +PS mmap(NULL, 3362224, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f6ac34c8000 +PS close(3) = 0 +PS rt_sigaction(SIGSYS, {sa_handler=0x5599d3aeec00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f6ac3c01da0}, NULL, 8) = 0 +PS rt_sigaction(SIGPWR, {sa_handler=0x5599d3aeec00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f6ac3c01da0}, NULL, 8) = 0 +PS rt_sigaction(SIGIO, {sa_handler=0x5599d3aeec00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f6ac3c01da0}, NULL, 8) = 0 +PS rt_sigaction(SIGVTALRM, {sa_handler=0x5599d3aeec00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f6ac3c01da0}, NULL, 8) = 0 +PS rt_sigaction(SIGXFSZ, {sa_handler=0x5599d3aeec00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f6ac3c01da0}, NULL, 8) = 0 +PS rt_sigaction(SIGXCPU, {sa_handler=0x5599d3aeec00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f6ac3c01da0}, NULL, 8) = 0 +PS rt_sigaction(SIGURG, {sa_handler=0x5599d3aeec00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f6ac3c01da0}, NULL, 8) = 0 +PS rt_sigaction(SIGTTIN, {sa_handler=0x5599d3aeec00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f6ac3c01da0}, NULL, 8) = 0 +PS rt_sigaction(SIGCHLD, {sa_handler=0x5599d3aeec00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f6ac3c01da0}, NULL, 8) = 0 +PS rt_sigaction(SIGSTKFLT, {sa_handler=0x5599d3aeec00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f6ac3c01da0}, NULL, 8) = 0 +PS rt_sigaction(SIGTERM, {sa_handler=0x5599d3aeec00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f6ac3c01da0}, NULL, 8) = 0 +PS rt_sigaction(SIGALRM, {sa_handler=0x5599d3aeec00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f6ac3c01da0}, NULL, 8) = 0 +PS rt_sigaction(SIGPIPE, {sa_handler=0x5599d3aeec00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f6ac3c01da0}, NULL, 8) = 0 +PS rt_sigaction(SIGUSR2, {sa_handler=0x5599d3aeec00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f6ac3c01da0}, NULL, 8) = 0 +PS rt_sigaction(SIGSEGV, {sa_handler=0x5599d3aeec00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f6ac3c01da0}, NULL, 8) = 0 +PS rt_sigaction(SIGUSR1, {sa_handler=0x5599d3aeec00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f6ac3c01da0}, NULL, 8) = 0 +PS rt_sigaction(SIGFPE, {sa_handler=0x5599d3aeec00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f6ac3c01da0}, NULL, 8) = 0 +PS rt_sigaction(SIGBUS, {sa_handler=0x5599d3aeec00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f6ac3c01da0}, NULL, 8) = 0 +PS rt_sigaction(SIGABRT, {sa_handler=0x5599d3aeec00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f6ac3c01da0}, NULL, 8) = 0 +PS rt_sigaction(SIGTRAP, {sa_handler=0x5599d3aeec00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f6ac3c01da0}, NULL, 8) = 0 +PS rt_sigaction(SIGILL, {sa_handler=0x5599d3aeec00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f6ac3c01da0}, NULL, 8) = 0 +PS rt_sigaction(SIGHUP, {sa_handler=0x5599d3aeec00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f6ac3c01da0}, NULL, 8) = 0 +PS openat(AT_FDCWD, "/proc/self/stat", O_RDONLY) = 3 +PS read(3, "PS (ps) R DASH PS 64397 3"..., 1024) = 319 +PS close(3) = 0 +PS ioctl(1, TIOCGWINSZ, 0x7ffe1a0820d0) = -1 ENOTTY (Inappropriate ioctl for device) +PS ioctl(2, TIOCGWINSZ, {ws_row=69, ws_col=119, ws_xpixel=1071, ws_ypixel=1311}) = 0 +PS ioctl(1, TCGETS, 0x7ffe1a082020) = -1 ENOTTY (Inappropriate ioctl for device) +PS geteuid() = 1000 +PS openat(AT_FDCWD, "/proc/uptime", O_RDONLY) = 3 +PS lseek(3, 0, SEEK_SET) = 0 +PS read(3, "14750.48 105590.95\n", 8191) = 19 +PS openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 4 +PS newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=2998, ...}, AT_EMPTY_PATH) = 0 +PS read(4, "# Locale name alias data base.\n#"..., 4096) = 2998 +PS read(4, "", 4096) = 0 +PS close(4) = 0 +PS openat(AT_FDCWD, "/usr/share/locale/en_US.UTF-8/LC_MESSAGES/procps-ng.mo", O_RDONLY) = -1 ENOENT (No such file or directory) +PS openat(AT_FDCWD, "/usr/share/locale/en_US.utf8/LC_MESSAGES/procps-ng.mo", O_RDONLY) = -1 ENOENT (No such file or directory) +PS openat(AT_FDCWD, "/usr/share/locale/en_US/LC_MESSAGES/procps-ng.mo", O_RDONLY) = -1 ENOENT (No such file or directory) +PS openat(AT_FDCWD, "/usr/share/locale/en.UTF-8/LC_MESSAGES/procps-ng.mo", O_RDONLY) = -1 ENOENT (No such file or directory) +PS openat(AT_FDCWD, "/usr/share/locale/en.utf8/LC_MESSAGES/procps-ng.mo", O_RDONLY) = -1 ENOENT (No such file or directory) +PS openat(AT_FDCWD, "/usr/share/locale/en/LC_MESSAGES/procps-ng.mo", O_RDONLY) = -1 ENOENT (No such file or directory) +PS openat(AT_FDCWD, "/proc/sys/kernel/pid_max", O_RDONLY) = 4 +PS read(4, "4194304\n", 23) = 8 +PS close(4) = 0 +PS mmap(NULL, 139264, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6ac34a6000 +PS mprotect(0x7f6ac34c7000, 4096, PROT_NONE) = 0 +PS openat(AT_FDCWD, "/proc/sys/kernel/osrelease", O_RDONLY) = 4 +PS newfstatat(4, "", {st_mode=S_IFREG|0444, st_size=0, ...}, AT_EMPTY_PATH) = 0 +PS read(4, "5.14.15-arch1-1\n", 1024) = 16 +PS close(4) = 0 +PS openat(AT_FDCWD, "/proc/meminfo", O_RDONLY) = 4 +PS lseek(4, 0, SEEK_SET) = 0 +PS read(4, "MemTotal: 16144640 kB\nMemF"..., 8191) = 1475 +PS newfstatat(AT_FDCWD, "/proc/self/task", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 5 +PS newfstatat(5, "", {st_mode=S_IFDIR|0555, st_size=0, ...}, AT_EMPTY_PATH) = 0 +PS mmap(NULL, 135168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6ac3485000 +PS mmap(NULL, 135168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6ac3464000 +PS getdents64(5, 0x5599d4d670c0 /* 291 entries */, 32768) = 7824 +PS newfstatat(AT_FDCWD, "/proc/1", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/1/stat", O_RDONLY) = 6 +PS read(6, "1 (systemd) S 0 1 1 0 -1 4194560"..., 1024) = 195 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1/status", O_RDONLY) = 6 +PS read(6, "Name:\tsystemd\nUmask:\t0000\nState:"..., 1024) = 1024 +PS read(6, "luntary_ctxt_switches:\t3587\nnonv"..., 1024) = 60 +PS close(6) = 0 +PS socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 6 +PS connect(6, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) +PS close(6) = 0 +PS socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 6 +PS connect(6, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/etc/nsswitch.conf", {st_mode=S_IFREG|0644, st_size=328, ...}, 0) = 0 +PS newfstatat(AT_FDCWD, "/", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0 +PS openat(AT_FDCWD, "/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 6 +PS newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=328, ...}, AT_EMPTY_PATH) = 0 +PS read(6, "# Name Service Switch configurat"..., 4096) = 328 +PS read(6, "", 4096) = 0 +PS newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=328, ...}, AT_EMPTY_PATH) = 0 +PS close(6) = 0 +PS openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 6 +PS newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=92088, ...}, AT_EMPTY_PATH) = 0 +PS mmap(NULL, 92088, PROT_READ, MAP_PRIVATE, 6, 0) = 0x7f6ac3dcc000 +PS close(6) = 0 +PS openat(AT_FDCWD, "/usr/lib/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 6 +PS read(6, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P5\0\0\0\0\0\0"..., 832) = 832 +PS newfstatat(6, "", {st_mode=S_IFREG|0755, st_size=51376, ...}, AT_EMPTY_PATH) = 0 +PS mmap(NULL, 79320, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 6, 0) = 0x7f6ac3450000 +PS mmap(0x7f6ac3453000, 28672, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 6, 0x3000) = 0x7f6ac3453000 +PS mmap(0x7f6ac345a000, 8192, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 6, 0xa000) = 0x7f6ac345a000 +PS mmap(0x7f6ac345c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 6, 0xb000) = 0x7f6ac345c000 +PS mmap(0x7f6ac345e000, 21976, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f6ac345e000 +PS close(6) = 0 +PS mprotect(0x7f6ac345c000, 4096, PROT_READ) = 0 +PS munmap(0x7f6ac3dcc000, 92088) = 0 +PS openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 6 +PS newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=1257, ...}, AT_EMPTY_PATH) = 0 +PS lseek(6, 0, SEEK_SET) = 0 +PS read(6, "root:x:0:0::/root:/bin/bash\nbin:"..., 4096) = 1257 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1/cmdline", O_RDONLY) = 6 +PS read(6, "/sbin/init\0", 131072) = 11 +PS read(6, "", 131061) = 0 +PS close(6) = 0 +PS newfstatat(1, "", {st_mode=S_IFIFO|0600, st_size=0, ...}, AT_EMPTY_PATH) = 0 +PS openat(AT_FDCWD, "/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = -1 ENOENT (No such file or directory) +PS openat(AT_FDCWD, "/usr/lib/gconv/gconv-modules", O_RDONLY|O_CLOEXEC) = 6 +PS newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=56353, ...}, AT_EMPTY_PATH) = 0 +PS read(6, "# GNU libc iconv configuration.\n"..., 4096) = 4096 +PS read(6, "B1002//\tJUS_I.B1.002//\nmodule\tJU"..., 4096) = 4096 +PS read(6, "\tISO-IR-110//\t\tISO-8859-4//\nalia"..., 4096) = 4096 +PS read(6, "\t\t\tISO-8859-14//\nalias\tISO_8859-"..., 4096) = 4096 +PS read(6, "DIC-ES//\nalias\tEBCDICES//\t\tEBCDI"..., 4096) = 4096 +PS read(6, "CDIC-CP-ES//\t\tIBM284//\nalias\tCSI"..., 4096) = 4096 +PS read(6, "\t\tIBM863//\nalias\tOSF1002035F//\t\t"..., 4096) = 4096 +PS read(6, "937//\t\tIBM937//\nmodule\tIBM937//\t"..., 4096) = 4096 +PS brk(0x5599d4da5000) = 0x5599d4da5000 +PS read(6, "UJIS//\t\t\tEUC-JP//\nmodule\tEUC-JP/"..., 4096) = 4096 +PS read(6, "lias\tISO2022CN//\t\tISO-2022-CN//\n"..., 4096) = 4096 +PS read(6, "O_5427-EXT//\nalias\tISO_5427EXT//"..., 4096) = 4096 +PS read(6, "ost\nmodule\tMAC-SAMI//\t\tINTERNAL\t"..., 4096) = 4096 +PS read(6, "112//\t\tINTERNAL\t\tIBM1112\t\t1\nmodu"..., 4096) = 4096 +PS read(6, "s\tCP9448//\t\tIBM9448//\nalias\tCSIB"..., 4096) = 3105 +PS read(6, "", 4096) = 0 +PS close(6) = 0 +PS futex(0x7f6ac3d874dc, FUTEX_WAKE_PRIVATE, 2147483647) = 0 +PS openat(AT_FDCWD, "/etc/localtime", O_RDONLY|O_CLOEXEC) = 6 +PS newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=2654, ...}, AT_EMPTY_PATH) = 0 +PS newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=2654, ...}, AT_EMPTY_PATH) = 0 +PS read(6, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\v\0\0\0\v\0\0\0\0"..., 4096) = 2654 +PS lseek(6, -1671, SEEK_CUR) = 983 +PS read(6, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\v\0\0\0\v\0\0\0\0"..., 4096) = 1671 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/stat", O_RDONLY) = 6 +PS newfstatat(6, "", {st_mode=S_IFREG|0444, st_size=0, ...}, AT_EMPTY_PATH) = 0 +PS read(6, "cpu 844148 58 351892 10477496 5"..., 1024) = 1024 +PS read(6, " 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"..., 1024) = 1024 +PS read(6, " 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"..., 1024) = 1024 +PS read(6, " 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"..., 1024) = 1024 +PS read(6, " 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"..., 1024) = 673 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/2", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/2/stat", O_RDONLY) = 6 +PS read(6, "2 (kthreadd) S 0 0 0 0 -1 212998"..., 2048) = 150 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/2/status", O_RDONLY) = 6 +PS read(6, "Name:\tkthreadd\nUmask:\t0000\nState"..., 2048) = 729 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/2/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/3", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/3/stat", O_RDONLY) = 6 +PS read(6, "3 (rcu_gp) I 2 0 0 0 -1 69238880"..., 2048) = 151 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/3/status", O_RDONLY) = 6 +PS read(6, "Name:\trcu_gp\nUmask:\t0000\nState:\t"..., 2048) = 721 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/3/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/4", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/4/stat", O_RDONLY) = 6 +PS read(6, "4 (rcu_par_gp) I 2 0 0 0 -1 6923"..., 2048) = 155 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/4/status", O_RDONLY) = 6 +PS read(6, "Name:\trcu_par_gp\nUmask:\t0000\nSta"..., 2048) = 725 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/4/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/6", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/6/stat", O_RDONLY) = 6 +PS read(6, "6 (kworker/0:0H-events_highpri) "..., 2048) = 172 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/6/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/0:0H-events_highpr"..., 2048) = 740 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/6/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/8", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/8/stat", O_RDONLY) = 6 +PS read(6, "8 (mm_percpu_wq) I 2 0 0 0 -1 69"..., 2048) = 157 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/8/status", O_RDONLY) = 6 +PS read(6, "Name:\tmm_percpu_wq\nUmask:\t0000\nS"..., 2048) = 727 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/8/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/10", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/10/stat", O_RDONLY) = 6 +PS read(6, "10 (rcu_tasks_kthre) S 2 0 0 0 -"..., 2048) = 159 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/10/status", O_RDONLY) = 6 +PS read(6, "Name:\trcu_tasks_kthre\nUmask:\t000"..., 2048) = 738 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/10/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/11", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/11/stat", O_RDONLY) = 6 +PS read(6, "11 (rcu_tasks_rude_) S 2 0 0 0 -"..., 2048) = 159 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/11/status", O_RDONLY) = 6 +PS read(6, "Name:\trcu_tasks_rude_\nUmask:\t000"..., 2048) = 738 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/11/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/12", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/12/stat", O_RDONLY) = 6 +PS read(6, "12 (rcu_tasks_trace) S 2 0 0 0 -"..., 2048) = 159 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/12/status", O_RDONLY) = 6 +PS read(6, "Name:\trcu_tasks_trace\nUmask:\t000"..., 2048) = 738 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/12/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/13", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/13/stat", O_RDONLY) = 6 +PS read(6, "13 (ksoftirqd/0) S 2 0 0 0 -1 69"..., 2048) = 158 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/13/status", O_RDONLY) = 6 +PS read(6, "Name:\tksoftirqd/0\nUmask:\t0000\nSt"..., 2048) = 738 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/13/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/14", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/14/stat", O_RDONLY) = 6 +PS read(6, "14 (rcu_preempt) I 2 0 0 0 -1 21"..., 2048) = 157 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/14/status", O_RDONLY) = 6 +PS read(6, "Name:\trcu_preempt\nUmask:\t0000\nSt"..., 2048) = 736 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/14/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/15", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/15/stat", O_RDONLY) = 6 +PS read(6, "15 (rcub/0) S 2 0 0 0 -1 2129984"..., 2048) = 150 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/15/status", O_RDONLY) = 6 +PS read(6, "Name:\trcub/0\nUmask:\t0000\nState:\t"..., 2048) = 729 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/15/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/16", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/16/stat", O_RDONLY) = 6 +PS read(6, "16 (rcuc/0) S 2 0 0 0 -1 6923884"..., 2048) = 151 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/16/status", O_RDONLY) = 6 +PS read(6, "Name:\trcuc/0\nUmask:\t0000\nState:\t"..., 2048) = 727 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/16/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/17", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/17/stat", O_RDONLY) = 6 +PS read(6, "17 (migration/0) S 2 0 0 0 -1 69"..., 2048) = 159 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/17/status", O_RDONLY) = 6 +PS read(6, "Name:\tmigration/0\nUmask:\t0000\nSt"..., 2048) = 735 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/17/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/18", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/18/stat", O_RDONLY) = 6 +PS read(6, "18 (idle_inject/0) S 2 0 0 0 -1 "..., 2048) = 160 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/18/status", O_RDONLY) = 6 +PS read(6, "Name:\tidle_inject/0\nUmask:\t0000\n"..., 2048) = 734 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/18/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/20", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/20/stat", O_RDONLY) = 6 +PS read(6, "20 (cpuhp/0) S 2 0 0 0 -1 692388"..., 2048) = 152 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/20/status", O_RDONLY) = 6 +PS read(6, "Name:\tcpuhp/0\nUmask:\t0000\nState:"..., 2048) = 729 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/20/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/21", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/21/stat", O_RDONLY) = 6 +PS read(6, "21 (cpuhp/1) S 2 0 0 0 -1 692391"..., 2048) = 152 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/21/status", O_RDONLY) = 6 +PS read(6, "Name:\tcpuhp/1\nUmask:\t0000\nState:"..., 2048) = 729 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/21/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/22", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/22/stat", O_RDONLY) = 6 +PS read(6, "22 (idle_inject/1) S 2 0 0 0 -1 "..., 2048) = 160 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/22/status", O_RDONLY) = 6 +PS read(6, "Name:\tidle_inject/1\nUmask:\t0000\n"..., 2048) = 734 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/22/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/23", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/23/stat", O_RDONLY) = 6 +PS read(6, "23 (migration/1) S 2 0 0 0 -1 69"..., 2048) = 160 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/23/status", O_RDONLY) = 6 +PS read(6, "Name:\tmigration/1\nUmask:\t0000\nSt"..., 2048) = 735 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/23/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/24", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/24/stat", O_RDONLY) = 6 +PS read(6, "24 (rcuc/1) S 2 0 0 0 -1 6923884"..., 2048) = 151 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/24/status", O_RDONLY) = 6 +PS read(6, "Name:\trcuc/1\nUmask:\t0000\nState:\t"..., 2048) = 727 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/24/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/25", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/25/stat", O_RDONLY) = 6 +PS read(6, "25 (ksoftirqd/1) S 2 0 0 0 -1 69"..., 2048) = 158 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/25/status", O_RDONLY) = 6 +PS read(6, "Name:\tksoftirqd/1\nUmask:\t0000\nSt"..., 2048) = 737 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/25/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/27", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/27/stat", O_RDONLY) = 6 +PS read(6, "27 (kworker/1:0H-events_highpri)"..., 2048) = 173 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/27/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/1:0H-events_highpr"..., 2048) = 744 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/27/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/28", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/28/stat", O_RDONLY) = 6 +PS read(6, "28 (cpuhp/2) S 2 0 0 0 -1 692391"..., 2048) = 152 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/28/status", O_RDONLY) = 6 +PS read(6, "Name:\tcpuhp/2\nUmask:\t0000\nState:"..., 2048) = 729 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/28/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/29", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/29/stat", O_RDONLY) = 6 +PS read(6, "29 (idle_inject/2) S 2 0 0 0 -1 "..., 2048) = 160 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/29/status", O_RDONLY) = 6 +PS read(6, "Name:\tidle_inject/2\nUmask:\t0000\n"..., 2048) = 734 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/29/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/30", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/30/stat", O_RDONLY) = 6 +PS read(6, "30 (migration/2) S 2 0 0 0 -1 69"..., 2048) = 160 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/30/status", O_RDONLY) = 6 +PS read(6, "Name:\tmigration/2\nUmask:\t0000\nSt"..., 2048) = 735 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/30/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/31", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/31/stat", O_RDONLY) = 6 +PS read(6, "31 (rcuc/2) S 2 0 0 0 -1 6923884"..., 2048) = 151 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/31/status", O_RDONLY) = 6 +PS read(6, "Name:\trcuc/2\nUmask:\t0000\nState:\t"..., 2048) = 727 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/31/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/32", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/32/stat", O_RDONLY) = 6 +PS read(6, "32 (ksoftirqd/2) S 2 0 0 0 -1 69"..., 2048) = 158 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/32/status", O_RDONLY) = 6 +PS read(6, "Name:\tksoftirqd/2\nUmask:\t0000\nSt"..., 2048) = 738 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/32/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/34", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/34/stat", O_RDONLY) = 6 +PS read(6, "34 (kworker/2:0H-kblockd) I 2 0 "..., 2048) = 166 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/34/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/2:0H-kblockd\nUmask"..., 2048) = 737 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/34/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/35", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/35/stat", O_RDONLY) = 6 +PS read(6, "35 (cpuhp/3) S 2 0 0 0 -1 692391"..., 2048) = 152 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/35/status", O_RDONLY) = 6 +PS read(6, "Name:\tcpuhp/3\nUmask:\t0000\nState:"..., 2048) = 729 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/35/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/36", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/36/stat", O_RDONLY) = 6 +PS read(6, "36 (idle_inject/3) S 2 0 0 0 -1 "..., 2048) = 160 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/36/status", O_RDONLY) = 6 +PS read(6, "Name:\tidle_inject/3\nUmask:\t0000\n"..., 2048) = 734 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/36/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/37", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/37/stat", O_RDONLY) = 6 +PS read(6, "37 (migration/3) S 2 0 0 0 -1 69"..., 2048) = 160 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/37/status", O_RDONLY) = 6 +PS read(6, "Name:\tmigration/3\nUmask:\t0000\nSt"..., 2048) = 735 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/37/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/38", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/38/stat", O_RDONLY) = 6 +PS read(6, "38 (rcuc/3) S 2 0 0 0 -1 6923884"..., 2048) = 151 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/38/status", O_RDONLY) = 6 +PS read(6, "Name:\trcuc/3\nUmask:\t0000\nState:\t"..., 2048) = 727 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/38/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/39", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/39/stat", O_RDONLY) = 6 +PS read(6, "39 (ksoftirqd/3) S 2 0 0 0 -1 69"..., 2048) = 158 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/39/status", O_RDONLY) = 6 +PS read(6, "Name:\tksoftirqd/3\nUmask:\t0000\nSt"..., 2048) = 737 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/39/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/41", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/41/stat", O_RDONLY) = 6 +PS read(6, "41 (kworker/3:0H-kblockd) I 2 0 "..., 2048) = 166 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/41/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/3:0H-kblockd\nUmask"..., 2048) = 737 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/41/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/42", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/42/stat", O_RDONLY) = 6 +PS read(6, "42 (cpuhp/4) S 2 0 0 0 -1 692391"..., 2048) = 152 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/42/status", O_RDONLY) = 6 +PS read(6, "Name:\tcpuhp/4\nUmask:\t0000\nState:"..., 2048) = 729 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/42/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/43", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/43/stat", O_RDONLY) = 6 +PS read(6, "43 (idle_inject/4) S 2 0 0 0 -1 "..., 2048) = 160 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/43/status", O_RDONLY) = 6 +PS read(6, "Name:\tidle_inject/4\nUmask:\t0000\n"..., 2048) = 734 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/43/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/44", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/44/stat", O_RDONLY) = 6 +PS read(6, "44 (migration/4) S 2 0 0 0 -1 69"..., 2048) = 160 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/44/status", O_RDONLY) = 6 +PS read(6, "Name:\tmigration/4\nUmask:\t0000\nSt"..., 2048) = 735 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/44/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/45", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/45/stat", O_RDONLY) = 6 +PS read(6, "45 (rcuc/4) S 2 0 0 0 -1 6923884"..., 2048) = 151 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/45/status", O_RDONLY) = 6 +PS read(6, "Name:\trcuc/4\nUmask:\t0000\nState:\t"..., 2048) = 727 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/45/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/46", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/46/stat", O_RDONLY) = 6 +PS read(6, "46 (ksoftirqd/4) S 2 0 0 0 -1 69"..., 2048) = 158 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/46/status", O_RDONLY) = 6 +PS read(6, "Name:\tksoftirqd/4\nUmask:\t0000\nSt"..., 2048) = 737 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/46/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/48", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/48/stat", O_RDONLY) = 6 +PS read(6, "48 (kworker/4:0H-events_highpri)"..., 2048) = 173 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/48/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/4:0H-events_highpr"..., 2048) = 744 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/48/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/49", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/49/stat", O_RDONLY) = 6 +PS read(6, "49 (cpuhp/5) S 2 0 0 0 -1 692391"..., 2048) = 152 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/49/status", O_RDONLY) = 6 +PS read(6, "Name:\tcpuhp/5\nUmask:\t0000\nState:"..., 2048) = 729 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/49/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/50", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/50/stat", O_RDONLY) = 6 +PS read(6, "50 (idle_inject/5) S 2 0 0 0 -1 "..., 2048) = 160 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/50/status", O_RDONLY) = 6 +PS read(6, "Name:\tidle_inject/5\nUmask:\t0000\n"..., 2048) = 734 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/50/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/51", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/51/stat", O_RDONLY) = 6 +PS read(6, "51 (migration/5) S 2 0 0 0 -1 69"..., 2048) = 160 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/51/status", O_RDONLY) = 6 +PS read(6, "Name:\tmigration/5\nUmask:\t0000\nSt"..., 2048) = 735 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/51/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/52", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/52/stat", O_RDONLY) = 6 +PS read(6, "52 (rcuc/5) S 2 0 0 0 -1 6923884"..., 2048) = 151 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/52/status", O_RDONLY) = 6 +PS read(6, "Name:\trcuc/5\nUmask:\t0000\nState:\t"..., 2048) = 727 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/52/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/53", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/53/stat", O_RDONLY) = 6 +PS read(6, "53 (ksoftirqd/5) S 2 0 0 0 -1 69"..., 2048) = 158 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/53/status", O_RDONLY) = 6 +PS read(6, "Name:\tksoftirqd/5\nUmask:\t0000\nSt"..., 2048) = 739 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/53/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/55", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/55/stat", O_RDONLY) = 6 +PS read(6, "55 (kworker/5:0H-kblockd) I 2 0 "..., 2048) = 166 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/55/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/5:0H-kblockd\nUmask"..., 2048) = 737 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/55/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/56", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/56/stat", O_RDONLY) = 6 +PS read(6, "56 (cpuhp/6) S 2 0 0 0 -1 692391"..., 2048) = 152 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/56/status", O_RDONLY) = 6 +PS read(6, "Name:\tcpuhp/6\nUmask:\t0000\nState:"..., 2048) = 729 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/56/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/57", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/57/stat", O_RDONLY) = 6 +PS read(6, "57 (idle_inject/6) S 2 0 0 0 -1 "..., 2048) = 160 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/57/status", O_RDONLY) = 6 +PS read(6, "Name:\tidle_inject/6\nUmask:\t0000\n"..., 2048) = 734 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/57/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/58", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/58/stat", O_RDONLY) = 6 +PS read(6, "58 (migration/6) S 2 0 0 0 -1 69"..., 2048) = 160 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/58/status", O_RDONLY) = 6 +PS read(6, "Name:\tmigration/6\nUmask:\t0000\nSt"..., 2048) = 735 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/58/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/59", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/59/stat", O_RDONLY) = 6 +PS read(6, "59 (rcuc/6) S 2 0 0 0 -1 6923884"..., 2048) = 151 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/59/status", O_RDONLY) = 6 +PS read(6, "Name:\trcuc/6\nUmask:\t0000\nState:\t"..., 2048) = 727 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/59/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/60", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/60/stat", O_RDONLY) = 6 +PS read(6, "60 (ksoftirqd/6) S 2 0 0 0 -1 69"..., 2048) = 158 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/60/status", O_RDONLY) = 6 +PS read(6, "Name:\tksoftirqd/6\nUmask:\t0000\nSt"..., 2048) = 738 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/60/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/62", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/62/stat", O_RDONLY) = 6 +PS read(6, "62 (kworker/6:0H-events_highpri)"..., 2048) = 173 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/62/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/6:0H-events_highpr"..., 2048) = 744 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/62/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/63", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/63/stat", O_RDONLY) = 6 +PS read(6, "63 (cpuhp/7) S 2 0 0 0 -1 692391"..., 2048) = 152 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/63/status", O_RDONLY) = 6 +PS read(6, "Name:\tcpuhp/7\nUmask:\t0000\nState:"..., 2048) = 729 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/63/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/64", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/64/stat", O_RDONLY) = 6 +PS read(6, "64 (idle_inject/7) S 2 0 0 0 -1 "..., 2048) = 160 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/64/status", O_RDONLY) = 6 +PS read(6, "Name:\tidle_inject/7\nUmask:\t0000\n"..., 2048) = 734 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/64/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/65", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/65/stat", O_RDONLY) = 6 +PS read(6, "65 (migration/7) S 2 0 0 0 -1 69"..., 2048) = 160 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/65/status", O_RDONLY) = 6 +PS read(6, "Name:\tmigration/7\nUmask:\t0000\nSt"..., 2048) = 735 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/65/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/66", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/66/stat", O_RDONLY) = 6 +PS read(6, "66 (rcuc/7) S 2 0 0 0 -1 6923884"..., 2048) = 151 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/66/status", O_RDONLY) = 6 +PS read(6, "Name:\trcuc/7\nUmask:\t0000\nState:\t"..., 2048) = 727 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/66/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/67", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/67/stat", O_RDONLY) = 6 +PS read(6, "67 (ksoftirqd/7) S 2 0 0 0 -1 69"..., 2048) = 158 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/67/status", O_RDONLY) = 6 +PS read(6, "Name:\tksoftirqd/7\nUmask:\t0000\nSt"..., 2048) = 737 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/67/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/68", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/68/stat", O_RDONLY) = 6 +PS read(6, "68 (kworker/7:0-events) I 2 0 0 "..., 2048) = 164 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/68/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/7:0-events\nUmask:\t"..., 2048) = 740 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/68/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/69", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/69/stat", O_RDONLY) = 6 +PS read(6, "69 (kworker/7:0H-events_highpri)"..., 2048) = 173 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/69/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/7:0H-events_highpr"..., 2048) = 744 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/69/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/70", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/70/stat", O_RDONLY) = 6 +PS read(6, "70 (kdevtmpfs) S 2 0 0 0 -1 2130"..., 2048) = 153 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/70/status", O_RDONLY) = 6 +PS read(6, "Name:\tkdevtmpfs\nUmask:\t0022\nStat"..., 2048) = 734 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/70/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/71", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/71/stat", O_RDONLY) = 6 +PS read(6, "71 (netns) I 2 0 0 0 -1 69238880"..., 2048) = 151 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/71/status", O_RDONLY) = 6 +PS read(6, "Name:\tnetns\nUmask:\t0000\nState:\tI"..., 2048) = 724 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/71/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS write(1, "UID PID PPID C STIM"..., 4096) = 4096 +PS newfstatat(AT_FDCWD, "/proc/72", +GREP <... read resumed>"UID PID PPID C STIM"..., 98304) = 4096 +PS <... newfstatat resumed>{st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/72/stat", O_RDONLY +GREP read(0, +PS <... openat resumed>) = 6 +PS read(6, "72 (inet_frag_wq) I 2 0 0 0 -1 6"..., 2048) = 158 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/72/status", O_RDONLY) = 6 +PS read(6, "Name:\tinet_frag_wq\nUmask:\t0000\nS"..., 2048) = 731 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/72/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/73", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/73/stat", O_RDONLY) = 6 +PS read(6, "73 (kauditd) S 2 0 0 0 -1 107583"..., 2048) = 154 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/73/status", O_RDONLY) = 6 +PS read(6, "Name:\tkauditd\nUmask:\t0000\nState:"..., 2048) = 732 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/73/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/74", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/74/stat", O_RDONLY) = 6 +PS read(6, "74 (khungtaskd) S 2 0 0 0 -1 212"..., 2048) = 154 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/74/status", O_RDONLY) = 6 +PS read(6, "Name:\tkhungtaskd\nUmask:\t0000\nSta"..., 2048) = 735 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/74/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/75", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/75/stat", O_RDONLY) = 6 +PS read(6, "75 (oom_reaper) S 2 0 0 0 -1 107"..., 2048) = 157 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/75/status", O_RDONLY) = 6 +PS read(6, "Name:\toom_reaper\nUmask:\t0000\nSta"..., 2048) = 733 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/75/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/76", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/76/stat", O_RDONLY) = 6 +PS read(6, "76 (writeback) I 2 0 0 0 -1 6923"..., 2048) = 155 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/76/status", O_RDONLY) = 6 +PS read(6, "Name:\twriteback\nUmask:\t0000\nStat"..., 2048) = 728 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/76/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/77", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/77/stat", O_RDONLY) = 6 +PS read(6, "77 (kcompactd0) S 2 0 0 0 -1 107"..., 2048) = 159 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/77/status", O_RDONLY) = 6 +PS read(6, "Name:\tkcompactd0\nUmask:\t0000\nSta"..., 2048) = 738 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/77/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/78", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/78/stat", O_RDONLY) = 6 +PS read(6, "78 (ksmd) S 2 0 0 0 -1 107583904"..., 2048) = 151 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/78/status", O_RDONLY) = 6 +PS read(6, "Name:\tksmd\nUmask:\t0000\nState:\tS "..., 2048) = 727 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/78/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/79", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/79/stat", O_RDONLY) = 6 +PS read(6, "79 (khugepaged) S 2 0 0 0 -1 107"..., 2048) = 158 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/79/status", O_RDONLY) = 6 +PS read(6, "Name:\tkhugepaged\nUmask:\t0000\nSta"..., 2048) = 733 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/79/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/89", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/89/stat", O_RDONLY) = 6 +PS read(6, "89 (kworker/1:1-events) I 2 0 0 "..., 2048) = 164 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/89/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/1:1-events\nUmask:\t"..., 2048) = 740 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/89/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/100", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/100/stat", O_RDONLY) = 6 +PS read(6, "100 (kintegrityd) I 2 0 0 0 -1 6"..., 2048) = 158 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/100/status", O_RDONLY) = 6 +PS read(6, "Name:\tkintegrityd\nUmask:\t0000\nSt"..., 2048) = 734 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/100/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/101", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/101/stat", O_RDONLY) = 6 +PS read(6, "101 (kblockd) I 2 0 0 0 -1 69238"..., 2048) = 154 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/101/status", O_RDONLY) = 6 +PS read(6, "Name:\tkblockd\nUmask:\t0000\nState:"..., 2048) = 730 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/101/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/102", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/102/stat", O_RDONLY) = 6 +PS read(6, "102 (blkcg_punt_bio) I 2 0 0 0 -"..., 2048) = 161 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/102/status", O_RDONLY) = 6 +PS read(6, "Name:\tblkcg_punt_bio\nUmask:\t0000"..., 2048) = 737 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/102/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/105", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/105/stat", O_RDONLY) = 6 +PS read(6, "105 (ata_sff) I 2 0 0 0 -1 69238"..., 2048) = 154 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/105/status", O_RDONLY) = 6 +PS read(6, "Name:\tata_sff\nUmask:\t0000\nState:"..., 2048) = 730 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/105/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/106", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/106/stat", O_RDONLY) = 6 +PS read(6, "106 (edac-poller) I 2 0 0 0 -1 6"..., 2048) = 158 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/106/status", O_RDONLY) = 6 +PS read(6, "Name:\tedac-poller\nUmask:\t0000\nSt"..., 2048) = 734 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/106/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/107", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/107/stat", O_RDONLY) = 6 +PS read(6, "107 (devfreq_wq) I 2 0 0 0 -1 69"..., 2048) = 157 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/107/status", O_RDONLY) = 6 +PS read(6, "Name:\tdevfreq_wq\nUmask:\t0000\nSta"..., 2048) = 733 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/107/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/108", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/108/stat", O_RDONLY) = 6 +PS read(6, "108 (watchdogd) S 2 0 0 0 -1 212"..., 2048) = 156 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/108/status", O_RDONLY) = 6 +PS read(6, "Name:\twatchdogd\nUmask:\t0000\nStat"..., 2048) = 736 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/108/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/109", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/109/stat", O_RDONLY) = 6 +PS read(6, "109 (kworker/4:1H-events_highpri"..., 2048) = 175 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/109/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/4:1H-events_highpr"..., 2048) = 753 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/109/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/110", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/110/stat", O_RDONLY) = 6 +PS read(6, "110 (ksgxd) S 2 0 0 0 -1 1075839"..., 2048) = 153 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/110/status", O_RDONLY) = 6 +PS read(6, "Name:\tksgxd\nUmask:\t0000\nState:\tS"..., 2048) = 733 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/110/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/111", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/111/stat", O_RDONLY) = 6 +PS read(6, "111 (kswapd0) S 2 0 0 0 -1 10618"..., 2048) = 156 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/111/status", O_RDONLY) = 6 +PS read(6, "Name:\tkswapd0\nUmask:\t0000\nState:"..., 2048) = 740 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/111/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/114", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/114/stat", O_RDONLY) = 6 +PS read(6, "114 (kthrotld) I 2 0 0 0 -1 6923"..., 2048) = 155 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/114/status", O_RDONLY) = 6 +PS read(6, "Name:\tkthrotld\nUmask:\t0000\nState"..., 2048) = 731 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/114/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/115", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/115/stat", O_RDONLY) = 6 +PS read(6, "115 (irq/122-pciehp) S 2 0 0 0 -"..., 2048) = 161 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/115/status", O_RDONLY) = 6 +PS read(6, "Name:\tirq/122-pciehp\nUmask:\t0000"..., 2048) = 739 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/115/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/116", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/116/stat", O_RDONLY) = 6 +PS read(6, "116 (irq/124-pciehp) S 2 0 0 0 -"..., 2048) = 161 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/116/status", O_RDONLY) = 6 +PS read(6, "Name:\tirq/124-pciehp\nUmask:\t0000"..., 2048) = 739 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/116/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/117", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/117/stat", O_RDONLY) = 6 +PS read(6, "117 (irq/126-pciehp) S 2 0 0 0 -"..., 2048) = 161 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/117/status", O_RDONLY) = 6 +PS read(6, "Name:\tirq/126-pciehp\nUmask:\t0000"..., 2048) = 739 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/117/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/122", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/122/stat", O_RDONLY) = 6 +PS read(6, "122 (acpi_thermal_pm) I 2 0 0 0 "..., 2048) = 162 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/122/status", O_RDONLY) = 6 +PS read(6, "Name:\tacpi_thermal_pm\nUmask:\t000"..., 2048) = 738 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/122/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/123", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/123/stat", O_RDONLY) = 6 +PS read(6, "123 (nvme-wq) I 2 0 0 0 -1 69238"..., 2048) = 154 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/123/status", O_RDONLY) = 6 +PS read(6, "Name:\tnvme-wq\nUmask:\t0000\nState:"..., 2048) = 730 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/123/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/124", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/124/stat", O_RDONLY) = 6 +PS read(6, "124 (nvme-reset-wq) I 2 0 0 0 -1"..., 2048) = 160 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/124/status", O_RDONLY) = 6 +PS read(6, "Name:\tnvme-reset-wq\nUmask:\t0000\n"..., 2048) = 736 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/124/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/125", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/125/stat", O_RDONLY) = 6 +PS read(6, "125 (nvme-delete-wq) I 2 0 0 0 -"..., 2048) = 161 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/125/status", O_RDONLY) = 6 +PS read(6, "Name:\tnvme-delete-wq\nUmask:\t0000"..., 2048) = 737 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/125/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/126", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/126/stat", O_RDONLY) = 6 +PS read(6, "126 (scsi_eh_0) S 2 0 0 0 -1 212"..., 2048) = 154 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/126/status", O_RDONLY) = 6 +PS read(6, "Name:\tscsi_eh_0\nUmask:\t0000\nStat"..., 2048) = 736 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/126/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/127", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/127/stat", O_RDONLY) = 6 +PS read(6, "127 (scsi_tmf_0) I 2 0 0 0 -1 69"..., 2048) = 157 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/127/status", O_RDONLY) = 6 +PS read(6, "Name:\tscsi_tmf_0\nUmask:\t0000\nSta"..., 2048) = 733 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/127/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/128", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/128/stat", O_RDONLY) = 6 +PS read(6, "128 (scsi_eh_1) S 2 0 0 0 -1 212"..., 2048) = 154 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/128/status", O_RDONLY) = 6 +PS read(6, "Name:\tscsi_eh_1\nUmask:\t0000\nStat"..., 2048) = 736 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/128/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/129", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/129/stat", O_RDONLY) = 6 +PS read(6, "129 (scsi_tmf_1) I 2 0 0 0 -1 69"..., 2048) = 157 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/129/status", O_RDONLY) = 6 +PS read(6, "Name:\tscsi_tmf_1\nUmask:\t0000\nSta"..., 2048) = 733 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/129/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/130", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/130/stat", O_RDONLY) = 6 +PS read(6, "130 (scsi_eh_2) S 2 0 0 0 -1 212"..., 2048) = 154 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/130/status", O_RDONLY) = 6 +PS read(6, "Name:\tscsi_eh_2\nUmask:\t0000\nStat"..., 2048) = 737 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/130/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/131", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/131/stat", O_RDONLY) = 6 +PS read(6, "131 (scsi_tmf_2) I 2 0 0 0 -1 69"..., 2048) = 157 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/131/status", O_RDONLY) = 6 +PS read(6, "Name:\tscsi_tmf_2\nUmask:\t0000\nSta"..., 2048) = 733 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/131/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/135", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/135/stat", O_RDONLY) = 6 +PS read(6, "135 (mld) I 2 0 0 0 -1 69238880 "..., 2048) = 150 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/135/status", O_RDONLY) = 6 +PS read(6, "Name:\tmld\nUmask:\t0000\nState:\tI ("..., 2048) = 726 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/135/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/136", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/136/stat", O_RDONLY) = 6 +PS read(6, "136 (ipv6_addrconf) I 2 0 0 0 -1"..., 2048) = 160 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/136/status", O_RDONLY) = 6 +PS read(6, "Name:\tipv6_addrconf\nUmask:\t0000\n"..., 2048) = 736 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/136/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/146", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/146/stat", O_RDONLY) = 6 +PS read(6, "146 (kstrp) I 2 0 0 0 -1 6923888"..., 2048) = 152 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/146/status", O_RDONLY) = 6 +PS read(6, "Name:\tkstrp\nUmask:\t0000\nState:\tI"..., 2048) = 728 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/146/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/151", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/151/stat", O_RDONLY) = 6 +PS read(6, "151 (zswap1) I 2 0 0 0 -1 692388"..., 2048) = 153 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/151/status", O_RDONLY) = 6 +PS read(6, "Name:\tzswap1\nUmask:\t0000\nState:\t"..., 2048) = 729 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/151/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/152", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/152/stat", O_RDONLY) = 6 +PS read(6, "152 (zswap1) I 2 0 0 0 -1 692388"..., 2048) = 153 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/152/status", O_RDONLY) = 6 +PS read(6, "Name:\tzswap1\nUmask:\t0000\nState:\t"..., 2048) = 729 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/152/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/153", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/153/stat", O_RDONLY) = 6 +PS read(6, "153 (zswap-shrink) I 2 0 0 0 -1 "..., 2048) = 159 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/153/status", O_RDONLY) = 6 +PS read(6, "Name:\tzswap-shrink\nUmask:\t0000\nS"..., 2048) = 735 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/153/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/155", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/155/stat", O_RDONLY) = 6 +PS read(6, "155 (charger_manager) I 2 0 0 0 "..., 2048) = 162 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/155/status", O_RDONLY) = 6 +PS read(6, "Name:\tcharger_manager\nUmask:\t000"..., 2048) = 738 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/155/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/156", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/156/stat", O_RDONLY) = 6 +PS read(6, "156 (kworker/5:1H-events_highpri"..., 2048) = 175 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/156/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/5:1H-events_highpr"..., 2048) = 753 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/156/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/169", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/169/stat", O_RDONLY) = 6 +PS read(6, "169 (kworker/6:1H-events_highpri"..., 2048) = 176 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/169/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/6:1H-events_highpr"..., 2048) = 753 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/169/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/178", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/178/stat", O_RDONLY) = 6 +PS read(6, "178 (kworker/0:1H-events_highpri"..., 2048) = 176 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/178/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/0:1H-events_highpr"..., 2048) = 752 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/178/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/185", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/185/stat", O_RDONLY) = 6 +PS read(6, "185 (kworker/1:1H-events_highpri"..., 2048) = 177 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/185/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/1:1H-events_highpr"..., 2048) = 753 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/185/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/206", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/206/stat", O_RDONLY) = 6 +PS read(6, "206 (jbd2/sda6-8) S 2 0 0 0 -1 2"..., 2048) = 159 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/206/status", O_RDONLY) = 6 +PS read(6, "Name:\tjbd2/sda6-8\nUmask:\t0000\nSt"..., 2048) = 746 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/206/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/207", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/207/stat", O_RDONLY) = 6 +PS read(6, "207 (ext4-rsv-conver) I 2 0 0 0 "..., 2048) = 163 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/207/status", O_RDONLY) = 6 +PS read(6, "Name:\text4-rsv-conver\nUmask:\t000"..., 2048) = 738 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/207/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/212", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/212/stat", O_RDONLY) = 6 +PS read(6, "212 (kworker/7:1H-kblockd) I 2 0"..., 2048) = 169 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/212/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/7:1H-kblockd\nUmask"..., 2048) = 745 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/212/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/221", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/221/stat", O_RDONLY) = 6 +PS read(6, "221 (kworker/2:1H-kblockd) I 2 0"..., 2048) = 169 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/221/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/2:1H-kblockd\nUmask"..., 2048) = 746 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/221/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/223", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/223/stat", O_RDONLY) = 6 +PS read(6, "223 (kworker/3:1H-events_highpri"..., 2048) = 176 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/223/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/3:1H-events_highpr"..., 2048) = 753 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/223/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/245", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/245/stat", O_RDONLY) = 6 +PS read(6, "245 (systemd-journal) S 1 245 24"..., 2048) = 182 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/245/status", O_RDONLY) = 6 +PS read(6, "Name:\tsystemd-journal\nUmask:\t002"..., 2048) = 1115 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/245/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/systemd/systemd-journal"..., 131072) = 34 +PS read(6, "", 131038) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/260", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/260/stat", O_RDONLY) = 6 +PS read(6, "260 (systemd-udevd) S 1 260 260 "..., 2048) = 186 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/260/status", O_RDONLY) = 6 +PS read(6, "Name:\tsystemd-udevd\nUmask:\t0022\n"..., 2048) = 1114 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/260/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/systemd/systemd-udevd\0", 131072) = 31 +PS read(6, "", 131041) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/296", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/296/stat", O_RDONLY) = 6 +PS read(6, "296 (tpm_dev_wq) I 2 0 0 0 -1 69"..., 2048) = 158 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/296/status", O_RDONLY) = 6 +PS read(6, "Name:\ttpm_dev_wq\nUmask:\t0000\nSta"..., 2048) = 733 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/296/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/299", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/299/stat", O_RDONLY) = 6 +PS read(6, "299 (scsi_eh_3) S 2 0 0 0 -1 212"..., 2048) = 155 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/299/status", O_RDONLY) = 6 +PS read(6, "Name:\tscsi_eh_3\nUmask:\t0000\nStat"..., 2048) = 736 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/299/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/300", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/300/stat", O_RDONLY) = 6 +PS read(6, "300 (scsi_tmf_3) I 2 0 0 0 -1 69"..., 2048) = 158 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/300/status", O_RDONLY) = 6 +PS read(6, "Name:\tscsi_tmf_3\nUmask:\t0000\nSta"..., 2048) = 733 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/300/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/301", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/301/stat", O_RDONLY) = 6 +PS read(6, "301 (usb-storage) S 2 0 0 0 -1 2"..., 2048) = 159 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/301/status", O_RDONLY) = 6 +PS read(6, "Name:\tusb-storage\nUmask:\t0000\nSt"..., 2048) = 742 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/301/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/306", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/306/stat", O_RDONLY) = 6 +PS read(6, "306 (uas) I 2 0 0 0 -1 69238880 "..., 2048) = 151 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/306/status", O_RDONLY) = 6 +PS read(6, "Name:\tuas\nUmask:\t0000\nState:\tI ("..., 2048) = 726 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/306/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/307", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/307/stat", O_RDONLY) = 6 +PS read(6, "307 (ktpacpid) I 2 0 0 0 -1 6923"..., 2048) = 156 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/307/status", O_RDONLY) = 6 +PS read(6, "Name:\tktpacpid\nUmask:\t0000\nState"..., 2048) = 731 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/307/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/308", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/308/stat", O_RDONLY) = 6 +PS read(6, "308 (irq/131-mei_me) S 2 0 0 0 -"..., 2048) = 162 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/308/status", O_RDONLY) = 6 +PS read(6, "Name:\tirq/131-mei_me\nUmask:\t0000"..., 2048) = 740 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/308/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/327", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/327/stat", O_RDONLY) = 6 +PS read(6, "327 (cfg80211) I 2 0 0 0 -1 6923"..., 2048) = 156 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/327/status", O_RDONLY) = 6 +PS read(6, "Name:\tcfg80211\nUmask:\t0000\nState"..., 2048) = 731 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/327/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/335", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/335/stat", O_RDONLY) = 6 +PS read(6, "335 (cryptd) I 2 0 0 0 -1 692388"..., 2048) = 154 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/335/status", O_RDONLY) = 6 +PS read(6, "Name:\tcryptd\nUmask:\t0000\nState:\t"..., 2048) = 729 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/335/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/336", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/336/stat", O_RDONLY) = 6 +PS read(6, "336 (irq/149-iwlwifi) S 2 0 0 0 "..., 2048) = 165 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/336/status", O_RDONLY) = 6 +PS read(6, "Name:\tirq/149-iwlwifi\nUmask:\t000"..., 2048) = 745 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/336/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS write(1, "17:25 ? 00:00:00 [netns]\n"..., 4096) = 4096 +GREP <... read resumed>"17:25 ? 00:00:00 [netns]\n"..., 94208) = 4096 +PS newfstatat(AT_FDCWD, "/proc/360", +GREP newfstatat(1, "", +PS <... newfstatat resumed>{st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +GREP <... newfstatat resumed>{st_mode=S_IFIFO|0600, st_size=0, ...}, AT_EMPTY_PATH) = 0 +PS openat(AT_FDCWD, "/proc/360/stat", O_RDONLY +GREP read(0, +PS <... openat resumed>) = 6 +PS read(6, "360 (card0-crtc0) S 2 0 0 0 -1 2"..., 2048) = 159 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/360/status", O_RDONLY) = 6 +PS read(6, "Name:\tcard0-crtc0\nUmask:\t0000\nSt"..., 2048) = 738 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/360/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/361", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/361/stat", O_RDONLY) = 6 +PS read(6, "361 (card0-crtc1) S 2 0 0 0 -1 2"..., 2048) = 159 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/361/status", O_RDONLY) = 6 +PS read(6, "Name:\tcard0-crtc1\nUmask:\t0000\nSt"..., 2048) = 738 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/361/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/362", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/362/stat", O_RDONLY) = 6 +PS read(6, "362 (card0-crtc2) S 2 0 0 0 -1 2"..., 2048) = 159 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/362/status", O_RDONLY) = 6 +PS read(6, "Name:\tcard0-crtc2\nUmask:\t0000\nSt"..., 2048) = 738 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/362/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/369", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/369/stat", O_RDONLY) = 6 +PS read(6, "369 (bluetoothd) S 1 369 369 0 -"..., 2048) = 171 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/369/status", O_RDONLY) = 6 +PS read(6, "Name:\tbluetoothd\nUmask:\t0077\nSta"..., 2048) = 1096 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/369/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/bluetooth/bluetoothd\0-E"..., 131072) = 33 +PS read(6, "", 131039) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/370", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/370/stat", O_RDONLY) = 6 +PS read(6, "370 (dbus-daemon) S 1 370 370 0 "..., 2048) = 175 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/370/status", O_RDONLY) = 6 +PS read(6, "Name:\tdbus-daemon\nUmask:\t0022\nSt"..., 2048) = 1107 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/etc/nsswitch.conf", {st_mode=S_IFREG|0644, st_size=328, ...}, 0) = 0 +PS openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 6 +PS newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=1257, ...}, AT_EMPTY_PATH) = 0 +PS lseek(6, 0, SEEK_SET) = 0 +PS read(6, "root:x:0:0::/root:/bin/bash\nbin:"..., 4096) = 1257 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/370/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/bin/dbus-daemon\0--system\0--"..., 131072) = 105 +PS read(6, "", 130967) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/371", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/371/stat", O_RDONLY) = 6 +PS read(6, "371 (NetworkManager) S 1 371 371"..., 2048) = 181 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/371/status", O_RDONLY) = 6 +PS read(6, "Name:\tNetworkManager\nUmask:\t0022"..., 2048) = 1103 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/371/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/bin/NetworkManager\0--no-dae"..., 131072) = 36 +PS read(6, "", 131036) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/374", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/374/stat", O_RDONLY) = 6 +PS read(6, "374 (systemd-logind) S 1 374 374"..., 2048) = 175 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/374/status", O_RDONLY) = 6 +PS read(6, "Name:\tsystemd-logind\nUmask:\t0022"..., 2048) = 1113 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/374/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/systemd/systemd-logind\0", 131072) = 32 +PS read(6, "", 131040) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/391", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/391/stat", O_RDONLY) = 6 +PS read(6, "391 (auto-cpufreq) S 1 391 391 0"..., 2048) = 198 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/391/status", O_RDONLY) = 6 +PS read(6, "Name:\tauto-cpufreq\nUmask:\t0022\nS"..., 2048) = 1102 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/391/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/bin/python\0/usr/bin/auto-cp"..., 131072) = 47 +PS read(6, "", 131025) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/392", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/392/stat", O_RDONLY) = 6 +PS read(6, "392 (cupsd) S 1 392 392 0 -1 419"..., 2048) = 166 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/392/status", O_RDONLY) = 6 +PS read(6, "Name:\tcupsd\nUmask:\t0022\nState:\tS"..., 2048) = 1091 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/392/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/bin/cupsd\0-l\0", 131072) = 18 +PS read(6, "", 131054) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/393", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/393/stat", O_RDONLY) = 6 +PS read(6, "393 (sshd) S 1 393 393 0 -1 4194"..., 2048) = 164 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/393/status", O_RDONLY) = 6 +PS read(6, "Name:\tsshd\nUmask:\t0022\nState:\tS "..., 2048) = 1088 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/393/cmdline", O_RDONLY) = 6 +PS read(6, "sshd: /usr/bin/sshd -D [listener"..., 131072) = 55 +PS read(6, "", 131017) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/397", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/397/stat", O_RDONLY) = 6 +PS read(6, "397 (lightdm) S 1 397 397 0 -1 4"..., 2048) = 176 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/397/status", O_RDONLY) = 6 +PS read(6, "Name:\tlightdm\nUmask:\t0022\nState:"..., 2048) = 1093 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/397/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/bin/lightdm\0", 131072) = 17 +PS read(6, "", 131055) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/404", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/404/stat", O_RDONLY) = 6 +PS read(6, "404 (Xorg) S 397 404 404 1031 40"..., 2048) = 196 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/404/status", O_RDONLY) = 6 +PS read(6, "Name:\tXorg\nUmask:\t0022\nState:\tR "..., 2048) = 1099 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/404/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/Xorg\0:0\0-seat\0seat0\0-au"..., 131072) = 86 +PS read(6, "", 130986) = 0 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/tty/drivers", O_RDONLY) = 6 +PS read(6, "/dev/tty /dev/tty "..., 9999) = 569 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/dev/tty7", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x4, 0x7), ...}, 0) = 0 +PS newfstatat(AT_FDCWD, "/proc/447", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/447/stat", O_RDONLY) = 6 +PS read(6, "447 (irq/152-rmi4_sm) S 2 0 0 0 "..., 2048) = 163 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/447/status", O_RDONLY) = 6 +PS read(6, "Name:\tirq/152-rmi4_sm\nUmask:\t000"..., 2048) = 743 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/447/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/448", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/448/stat", O_RDONLY) = 6 +PS read(6, "448 (scsi_eh_4) S 2 0 0 0 -1 212"..., 2048) = 155 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/448/status", O_RDONLY) = 6 +PS read(6, "Name:\tscsi_eh_4\nUmask:\t0000\nStat"..., 2048) = 736 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/448/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/449", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/449/stat", O_RDONLY) = 6 +PS read(6, "449 (scsi_tmf_4) I 2 0 0 0 -1 69"..., 2048) = 158 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/449/status", O_RDONLY) = 6 +PS read(6, "Name:\tscsi_tmf_4\nUmask:\t0000\nSta"..., 2048) = 733 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/449/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/450", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/450/stat", O_RDONLY) = 6 +PS read(6, "450 (usb-storage) S 2 0 0 0 -1 2"..., 2048) = 159 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/450/status", O_RDONLY) = 6 +PS read(6, "Name:\tusb-storage\nUmask:\t0000\nSt"..., 2048) = 743 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/450/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/456", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/456/stat", O_RDONLY) = 6 +PS read(6, "456 (wpa_supplicant) S 1 456 456"..., 2048) = 181 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/456/status", O_RDONLY) = 6 +PS read(6, "Name:\twpa_supplicant\nUmask:\t0022"..., 2048) = 1102 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/456/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/bin/wpa_supplicant\0-u\0-s\0-O"..., 131072) = 53 +PS read(6, "", 131019) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/552", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/552/stat", O_RDONLY) = 6 +PS read(6, "552 (lightdm) S 397 397 397 0 -1"..., 2048) = 170 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/552/status", O_RDONLY) = 6 +PS read(6, "Name:\tlightdm\nUmask:\t0022\nState:"..., 2048) = 1104 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/552/cmdline", O_RDONLY) = 6 +PS read(6, "lightdm\0--session-child\00014\00021\0", 131072) = 30 +PS read(6, "", 131042) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/576", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/576/stat", O_RDONLY) = 6 +PS read(6, "576 (ntpd) S 1 576 576 0 -1 4194"..., 2048) = 166 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/576/status", O_RDONLY) = 6 +PS read(6, "Name:\tntpd\nUmask:\t0022\nState:\tS "..., 2048) = 1102 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/etc/nsswitch.conf", {st_mode=S_IFREG|0644, st_size=328, ...}, 0) = 0 +PS openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 6 +PS newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=1257, ...}, AT_EMPTY_PATH) = 0 +PS lseek(6, 0, SEEK_SET) = 0 +PS read(6, "root:x:0:0::/root:/bin/bash\nbin:"..., 4096) = 1257 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/576/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/bin/ntpd\0-g\0-u\0ntp:ntp\0", 131072) = 28 +PS read(6, "", 131044) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/610", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/610/stat", O_RDONLY) = 6 +PS read(6, "610 (systemd) S 1 610 610 0 -1 4"..., 2048) = 312 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/610/status", O_RDONLY) = 6 +PS read(6, "Name:\tsystemd\nUmask:\t0022\nState:"..., 2048) = 1124 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/etc/nsswitch.conf", {st_mode=S_IFREG|0644, st_size=328, ...}, 0) = 0 +PS openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 6 +PS newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=1257, ...}, AT_EMPTY_PATH) = 0 +PS lseek(6, 0, SEEK_SET) = 0 +PS read(6, "root:x:0:0::/root:/bin/bash\nbin:"..., 4096) = 1257 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/610/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/systemd/systemd\0--user\0", 131072) = 32 +PS read(6, "", 131040) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/611", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/611/stat", O_RDONLY) = 6 +PS read(6, "611 ((sd-pam)) S 610 610 610 0 -"..., 2048) = 168 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/611/status", O_RDONLY) = 6 +PS read(6, "Name:\t(sd-pam)\nUmask:\t0022\nState"..., 2048) = 1113 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/611/cmdline", O_RDONLY) = 6 +PS read(6, "(sd-pam)\0", 131072) = 9 +PS read(6, "", 131063) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/625", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/625/stat", O_RDONLY) = 6 +PS read(6, "625 (i3) S 552 625 625 0 -1 4194"..., 2048) = 312 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/625/status", O_RDONLY) = 6 +PS read(6, "Name:\ti3\nUmask:\t0022\nState:\tS (s"..., 2048) = 1126 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/625/cmdline", O_RDONLY) = 6 +PS read(6, "i3\0", 131072) = 3 +PS read(6, "", 131069) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/632", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/632/stat", O_RDONLY) = 6 +PS read(6, "632 (dbus-daemon) S 610 632 632 "..., 2048) = 315 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/632/status", O_RDONLY) = 6 +PS read(6, "Name:\tdbus-daemon\nUmask:\t0022\nSt"..., 2048) = 1134 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/632/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/bin/dbus-daemon\0--session\0-"..., 131072) = 106 +PS read(6, "", 130966) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/645", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/645/stat", O_RDONLY) = 6 +PS read(6, "645 (picom) S 1 644 644 0 -1 419"..., 2048) = 308 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/645/status", O_RDONLY) = 6 +PS read(6, "Name:\tpicom\nUmask:\t0022\nState:\tS"..., 2048) = 1128 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/645/cmdline", O_RDONLY) = 6 +PS read(6, "picom\0-f\0", 131072) = 9 +PS read(6, "", 131063) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/648", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/648/stat", O_RDONLY) = 6 +PS read(6, "648 (polybar) S 1 640 640 0 -1 4"..., 2048) = 332 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/648/status", O_RDONLY) = 6 +PS read(6, "Name:\tpolybar\nUmask:\t0022\nState:"..., 2048) = 1129 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/648/cmdline", O_RDONLY) = 6 +PS read(6, "polybar\0example\0-c\0/home/framal/"..., 131072) = 66 +PS read(6, "", 131006) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/653", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/653/stat", O_RDONLY) = 6 +PS read(6, "653 (pulseaudio) S 610 653 653 0"..., 2048) = 322 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/653/status", O_RDONLY) = 6 +PS read(6, "Name:\tpulseaudio\nUmask:\t0077\nSta"..., 2048) = 1149 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/653/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/bin/pulseaudio\0--daemonize="..., 131072) = 56 +PS read(6, "", 131016) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/654", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/654/stat", O_RDONLY) = 6 +PS read(6, "654 (rtkit-daemon) S 1 654 654 0"..., 2048) = 170 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/654/status", O_RDONLY) = 6 +PS read(6, "Name:\trtkit-daemon\nUmask:\t0777\nS"..., 2048) = 1114 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/etc/nsswitch.conf", {st_mode=S_IFREG|0644, st_size=328, ...}, 0) = 0 +PS openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 6 +PS newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=1257, ...}, AT_EMPTY_PATH) = 0 +PS lseek(6, 0, SEEK_SET) = 0 +PS read(6, "root:x:0:0::/root:/bin/bash\nbin:"..., 4096) = 1257 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/654/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/rtkit-daemon\0", 131072) = 22 +PS read(6, "", 131050) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/657", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/657/stat", O_RDONLY) = 6 +PS read(6, "657 (polkitd) S 1 657 657 0 -1 4"..., 2048) = 174 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/657/status", O_RDONLY) = 6 +PS read(6, "Name:\tpolkitd\nUmask:\t0022\nState:"..., 2048) = 1117 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/etc/nsswitch.conf", {st_mode=S_IFREG|0644, st_size=328, ...}, 0) = 0 +PS openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 6 +PS newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=1257, ...}, AT_EMPTY_PATH) = 0 +PS lseek(6, 0, SEEK_SET) = 0 +PS read(6, "root:x:0:0::/root:/bin/bash\nbin:"..., 4096) = 1257 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/657/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/polkit-1/polkitd\0--no-d"..., 131072) = 37 +PS read(6, "", 131035) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/690", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/690/stat", O_RDONLY) = 6 +PS read(6, "690 (gsettings-helpe) S 653 653 "..., 2048) = 311 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/690/status", O_RDONLY) = 6 +PS read(6, "Name:\tgsettings-helpe\nUmask:\t007"..., 2048) = 1144 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/690/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/pulse/gsettings-helper\0", 131072) = 32 +PS read(6, "", 131040) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/696", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/696/stat", O_RDONLY) = 6 +PS read(6, "696 (krfcommd) S 2 0 0 0 -1 2130"..., 2048) = 157 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/696/status", O_RDONLY) = 6 +PS read(6, "Name:\tkrfcommd\nUmask:\t0000\nState"..., 2048) = 735 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/696/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/1363", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/1363/stat", O_RDONLY) = 6 +PS read(6, "1363 (at-spi-bus-laun) S 610 136"..., 2048) = 319 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1363/status", O_RDONLY) = 6 +PS read(6, "Name:\tat-spi-bus-laun\nUmask:\t002"..., 2048) = 1138 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1363/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/at-spi-bus-launcher\0", 131072) = 29 +PS read(6, "", 131043) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/1677", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/1677/stat", O_RDONLY) = 6 +PS read(6, "1677 (signal-desktop) S 1 1643 1"..., 2048) = 344 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1677/status", O_RDONLY) = 6 +PS read(6, "Name:\tsignal-desktop\nUmask:\t0077"..., 2048) = 1144 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1677/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/signal-desktop/signal-d"..., 131072) = 42 +PS read(6, "", 131030) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/1680", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/1680/stat", O_RDONLY) = 6 +PS read(6, "1680 (signal-desktop) S 1677 164"..., 2048) = 321 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1680/status", O_RDONLY) = 6 +PS read(6, "Name:\tsignal-desktop\nUmask:\t0022"..., 2048) = 1138 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1680/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/signal-desktop/signal-d"..., 131072) = 73 +PS read(6, "", 130999) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/1681", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/1681/stat", O_RDONLY) = 6 +PS read(6, "1681 (signal-desktop) S 1677 164"..., 2048) = 321 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1681/status", O_RDONLY) = 6 +PS read(6, "Name:\tsignal-desktop\nUmask:\t0022"..., 2048) = 1147 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1681/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/signal-desktop/signal-d"..., 131072) = 53 +PS read(6, "", 131019) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/1683", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/1683/stat", O_RDONLY) = 6 +PS read(6, "1683 (signal-desktop) S 1681 164"..., 2048) = 317 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1683/status", O_RDONLY) = 6 +PS read(6, "Name:\tsignal-desktop\nUmask:\t0022"..., 2048) = 1145 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1683/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/signal-desktop/signal-d"..., 131072) = 53 +PS read(6, "", 131019) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/1752", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/1752/stat", O_RDONLY) = 6 +PS read(6, "1752 (signal-desktop) S 1680 164"..., 2048) = 334 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1752/status", O_RDONLY) = 6 +PS read(6, "Name:\tsignal-desktop\nUmask:\t0022"..., 2048) = 1149 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1752/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/signal-desktop/signal-d"..., 131072) = 411 +PS read(6, "", 130661) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/1769", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/1769/stat", O_RDONLY) = 6 +PS read(6, "1769 (signal-desktop) S 1677 164"..., 2048) = 321 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1769/status", O_RDONLY) = 6 +PS read(6, "Name:\tsignal-desktop\nUmask:\t0077"..., 2048) = 1138 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1769/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/signal-desktop/signal-d"..., 131072) = 366 +PS read(6, "", 130706) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/1807", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/1807/stat", O_RDONLY) = 6 +PS read(6, "1807 (signal-desktop) S 1677 164"..., 2048) = 337 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1807/status", O_RDONLY) = 6 +PS read(6, "Name:\tsignal-desktop\nUmask:\t0077"..., 2048) = 1149 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1807/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/signal-desktop/signal-d"..., 131072) = 489 +PS read(6, "", 130583) = 0 +PS close(6) = 0 +PS write(1, " 336 2 0 17:25 ? "..., 4096) = 4096 +PS newfstatat(AT_FDCWD, "/proc/1821", +GREP <... read resumed>" 336 2 0 17:25 ? "..., 90112) = 4096 +PS <... newfstatat resumed>{st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/1821/stat", O_RDONLY +GREP read(0, +PS <... openat resumed>) = 6 +PS read(6, "1821 (spotify) S 1 1779 1779 0 -"..., 2048) = 294 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1821/status", O_RDONLY) = 6 +PS read(6, "Name:\tspotify\nUmask:\t0022\nState:"..., 2048) = 1137 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1821/cmdline", O_RDONLY) = 6 +PS read(6, "/opt/spotify/spotify\0", 131072) = 21 +PS read(6, "", 131051) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/1825", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/1825/stat", O_RDONLY) = 6 +PS read(6, "1825 (spotify) S 1821 1779 1779 "..., 2048) = 284 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1825/status", O_RDONLY) = 6 +PS read(6, "Name:\tspotify\nUmask:\t0022\nState:"..., 2048) = 1131 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1825/cmdline", O_RDONLY) = 6 +PS read(6, "/opt/spotify/spotify --type=zygo"..., 131072) = 196 +PS read(6, "", 130876) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/1826", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/1826/stat", O_RDONLY) = 6 +PS read(6, "1826 (spotify) S 1821 1779 1779 "..., 2048) = 285 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1826/status", O_RDONLY) = 6 +PS read(6, "Name:\tspotify\nUmask:\t0022\nState:"..., 2048) = 1131 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1826/cmdline", O_RDONLY) = 6 +PS read(6, "/opt/spotify/spotify --type=zygo"..., 131072) = 176 +PS read(6, "", 130896) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/1841", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/1841/stat", O_RDONLY) = 6 +PS read(6, "1841 (spotify) S 1825 1779 1779 "..., 2048) = 294 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1841/status", O_RDONLY) = 6 +PS read(6, "Name:\tspotify\nUmask:\t0022\nState:"..., 2048) = 1140 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1841/cmdline", O_RDONLY) = 6 +PS read(6, "/opt/spotify/spotify --type=gpu-"..., 131072) = 459 +PS read(6, "", 130613) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/1848", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/1848/stat", O_RDONLY) = 6 +PS read(6, "1848 (dbus-daemon) S 1363 1363 1"..., 2048) = 314 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1848/status", O_RDONLY) = 6 +PS read(6, "Name:\tdbus-daemon\nUmask:\t0022\nSt"..., 2048) = 1138 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1848/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/bin/dbus-daemon\0--config-fi"..., 131072) = 109 +PS read(6, "", 130963) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/1857", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/1857/stat", O_RDONLY) = 6 +PS read(6, "1857 (at-spi2-registr) S 610 136"..., 2048) = 318 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1857/status", O_RDONLY) = 6 +PS read(6, "Name:\tat-spi2-registr\nUmask:\t002"..., 2048) = 1143 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1857/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/at-spi2-registryd\0--use"..., 131072) = 47 +PS read(6, "", 131025) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/1860", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/1860/stat", O_RDONLY) = 6 +PS read(6, "1860 (spotify) S 1826 1779 1779 "..., 2048) = 286 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1860/status", O_RDONLY) = 6 +PS read(6, "Name:\tspotify\nUmask:\t0022\nState:"..., 2048) = 1132 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1860/cmdline", O_RDONLY) = 6 +PS read(6, "/opt/spotify/spotify --type=util"..., 131072) = 417 +PS read(6, "", 130655) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/1871", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/1871/stat", O_RDONLY) = 6 +PS read(6, "1871 (spotify) S 1821 1779 1779 "..., 2048) = 289 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1871/status", O_RDONLY) = 6 +PS read(6, "Name:\tspotify\nUmask:\t0022\nState:"..., 2048) = 1133 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1871/cmdline", O_RDONLY) = 6 +PS read(6, "/opt/spotify/spotify --type=util"..., 131072) = 414 +PS read(6, "", 130658) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/1904", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/1904/stat", O_RDONLY) = 6 +PS read(6, "1904 (spotify) S 1826 1779 1779 "..., 2048) = 303 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1904/status", O_RDONLY) = 6 +PS read(6, "Name:\tspotify\nUmask:\t0022\nState:"..., 2048) = 1142 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1904/cmdline", O_RDONLY) = 6 +PS read(6, "/opt/spotify/spotify --type=rend"..., 131072) = 438 +PS read(6, "", 130634) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/1946", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/1946/stat", O_RDONLY) = 6 +PS read(6, "1946 (signal-desktop) S 1677 164"..., 2048) = 323 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1946/status", O_RDONLY) = 6 +PS read(6, "Name:\tsignal-desktop\nUmask:\t0077"..., 2048) = 1142 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/1946/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/signal-desktop/signal-d"..., 131072) = 362 +PS read(6, "", 130710) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/7732", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/7732/stat", O_RDONLY) = 6 +PS read(6, "7732 (kworker/4:0-events) I 2 0 "..., 2048) = 170 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/7732/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/4:0-events\nUmask:\t"..., 2048) = 748 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/7732/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/12839", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/12839/stat", O_RDONLY) = 6 +PS read(6, "12839 (upowerd) S 1 12839 12839 "..., 2048) = 177 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/12839/status", O_RDONLY) = 6 +PS read(6, "Name:\tupowerd\nUmask:\t0022\nState:"..., 2048) = 1120 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/12839/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/upowerd\0", 131072) = 17 +PS read(6, "", 131055) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/15837", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/15837/stat", O_RDONLY) = 6 +PS read(6, "15837 (kworker/3:0-events) I 2 0"..., 2048) = 171 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/15837/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/3:0-events\nUmask:\t"..., 2048) = 751 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/15837/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/16987", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/16987/stat", O_RDONLY) = 6 +PS read(6, "16987 (okular) S 1 16962 16962 0"..., 2048) = 337 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/16987/status", O_RDONLY) = 6 +PS read(6, "Name:\tokular\nUmask:\t0022\nState:\t"..., 2048) = 1140 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/16987/cmdline", O_RDONLY) = 6 +PS read(6, "okular\0", 131072) = 7 +PS read(6, "", 131065) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/24785", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/24785/stat", O_RDONLY) = 6 +PS read(6, "24785 (kworker/2:0-mm_percpu_wq)"..., 2048) = 177 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/24785/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/2:0-mm_percpu_wq\nU"..., 2048) = 758 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/24785/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/25396", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/25396/stat", O_RDONLY) = 6 +PS read(6, "25396 (kworker/6:0-events) I 2 0"..., 2048) = 171 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/25396/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/6:0-events\nUmask:\t"..., 2048) = 752 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/25396/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/25397", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/25397/stat", O_RDONLY) = 6 +PS read(6, "25397 (kworker/4:1-events) I 2 0"..., 2048) = 171 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/25397/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/4:1-events\nUmask:\t"..., 2048) = 752 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/25397/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS write(1, "nal-desktop/signal-desktop --typ"..., 4096 +GREP <... read resumed>"nal-desktop/signal-desktop --typ"..., 86016) = 4096 +PS <... write resumed>) = 4096 +GREP write(1, "root 153 2 0 17:2"..., 4096 +PS newfstatat(AT_FDCWD, "/proc/25401", +WC <... read resumed>"root 153 2 0 17:2"..., 16320) = 4096 +GREP <... write resumed>) = 4096 +WC read(0, +PS <... newfstatat resumed>{st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +GREP read(0, +PS openat(AT_FDCWD, "/proc/25401/stat", O_RDONLY) = 6 +PS read(6, "25401 (kworker/5:0-events) I 2 0"..., 2048) = 173 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/25401/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/5:0-events\nUmask:\t"..., 2048) = 755 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/25401/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/26035", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/26035/stat", O_RDONLY) = 6 +PS read(6, "26035 (kded5) S 610 632 632 0 -1"..., 2048) = 314 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/26035/status", O_RDONLY) = 6 +PS read(6, "Name:\tkded5\nUmask:\t0022\nState:\tS"..., 2048) = 1134 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/26035/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/bin/kded5\0", 131072) = 15 +PS read(6, "", 131057) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/28043", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/28043/stat", O_RDONLY) = 6 +PS read(6, "28043 (GeckoMain) S 1 28018 2801"..., 2048) = 343 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/28043/status", O_RDONLY) = 6 +PS read(6, "Name:\tGeckoMain\nUmask:\t0022\nStat"..., 2048) = 1148 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/28043/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/firefox/firefox\0", 131072) = 25 +PS read(6, "", 131047) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/28112", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/28112/stat", O_RDONLY) = 6 +PS read(6, "28112 (Socket Process) S 28043 2"..., 2048) = 331 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/28112/status", O_RDONLY) = 6 +PS read(6, "Name:\tSocket Process\nUmask:\t0022"..., 2048) = 1157 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/28112/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/firefox/firefox\0-conten"..., 131072) = 151 +PS read(6, "", 130921) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/28142", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/28142/stat", O_RDONLY) = 6 +PS read(6, "28142 (Privileged Cont) S 28043 "..., 2048) = 340 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/28142/status", O_RDONLY) = 6 +PS read(6, "Name:\tPrivileged Cont\nUmask:\t002"..., 2048) = 1164 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/28142/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/firefox/firefox\0-conten"..., 131072) = 190 +PS read(6, "", 130882) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/28215", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/28215/stat", O_RDONLY) = 6 +PS read(6, "28215 (WebExtensions) S 28043 28"..., 2048) = 337 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/28215/status", O_RDONLY) = 6 +PS read(6, "Name:\tWebExtensions\nUmask:\t0022\n"..., 2048) = 1162 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/28215/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/firefox/firefox\0-conten"..., 131072) = 191 +PS read(6, "", 130881) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/28263", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/28263/stat", O_RDONLY) = 6 +PS read(6, "28263 (Web Content) S 28043 2801"..., 2048) = 346 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/28263/status", O_RDONLY) = 6 +PS read(6, "Name:\tWeb Content\nUmask:\t0022\nSt"..., 2048) = 1163 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/28263/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/firefox/firefox\0-conten"..., 131072) = 191 +PS read(6, "", 130881) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/28270", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/28270/stat", O_RDONLY) = 6 +PS read(6, "28270 (bash) S 28043 28018 28018"..., 2048) = 315 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/28270/status", O_RDONLY) = 6 +PS read(6, "Name:\tbash\nUmask:\t0022\nState:\tS "..., 2048) = 1135 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/28270/cmdline", O_RDONLY) = 6 +PS read(6, "bash\0/home/framal/.local/lib/pyt"..., 131072) = 155 +PS read(6, "", 130917) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/28275", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/28275/stat", O_RDONLY) = 6 +PS read(6, "28275 (python) S 28270 28018 280"..., 2048) = 315 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/28275/status", O_RDONLY) = 6 +PS read(6, "Name:\tpython\nUmask:\t0022\nState:\t"..., 2048) = 1137 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/28275/cmdline", O_RDONLY) = 6 +PS read(6, "python\0-m\0pywalfox\0start\0", 131072) = 25 +PS read(6, "", 131047) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/28315", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/28315/stat", O_RDONLY) = 6 +PS read(6, "28315 (Web Content) S 28043 2801"..., 2048) = 338 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/28315/status", O_RDONLY) = 6 +PS read(6, "Name:\tWeb Content\nUmask:\t0022\nSt"..., 2048) = 1161 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/28315/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/firefox/firefox\0-conten"..., 131072) = 191 +PS read(6, "", 130881) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/28474", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/28474/stat", O_RDONLY) = 6 +PS read(6, "28474 (Web Content) S 28043 2801"..., 2048) = 340 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/28474/status", O_RDONLY) = 6 +PS read(6, "Name:\tWeb Content\nUmask:\t0022\nSt"..., 2048) = 1162 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/28474/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/firefox/firefox\0-conten"..., 131072) = 191 +PS read(6, "", 130881) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/36758", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/36758/stat", O_RDONLY) = 6 +PS read(6, "36758 (kworker/0:2-events) I 2 0"..., 2048) = 171 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/36758/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/0:2-events\nUmask:\t"..., 2048) = 751 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/36758/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/38723", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/38723/stat", O_RDONLY) = 6 +PS read(6, "38723 (Web Content) S 28043 2801"..., 2048) = 342 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/38723/status", O_RDONLY) = 6 +PS read(6, "Name:\tWeb Content\nUmask:\t0022\nSt"..., 2048) = 1163 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/38723/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/firefox/firefox\0-conten"..., 131072) = 191 +PS read(6, "", 130881) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/38788", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/38788/stat", O_RDONLY) = 6 +PS read(6, "38788 (Web Content) S 28043 2801"..., 2048) = 340 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/38788/status", O_RDONLY) = 6 +PS read(6, "Name:\tWeb Content\nUmask:\t0022\nSt"..., 2048) = 1162 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/38788/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/firefox/firefox\0-conten"..., 131072) = 191 +PS read(6, "", 130881) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/39247", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/39247/stat", O_RDONLY) = 6 +PS read(6, "39247 (Web Content) S 28043 2801"..., 2048) = 338 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/39247/status", O_RDONLY) = 6 +PS read(6, "Name:\tWeb Content\nUmask:\t0022\nSt"..., 2048) = 1161 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/39247/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/firefox/firefox\0-conten"..., 131072) = 191 +PS read(6, "", 130881) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/39356", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/39356/stat", O_RDONLY) = 6 +PS read(6, "39356 (kworker/2:1-events) I 2 0"..., 2048) = 170 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/39356/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/2:1-events\nUmask:\t"..., 2048) = 749 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/39356/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/39357", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/39357/stat", O_RDONLY) = 6 +PS read(6, "39357 (kworker/3:2-mm_percpu_wq)"..., 2048) = 176 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/39357/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/3:2-mm_percpu_wq\nU"..., 2048) = 756 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/39357/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/39485", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/39485/stat", O_RDONLY) = 6 +PS read(6, "39485 (Web Content) S 28043 2801"..., 2048) = 340 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/39485/status", O_RDONLY) = 6 +PS read(6, "Name:\tWeb Content\nUmask:\t0022\nSt"..., 2048) = 1161 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/39485/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/firefox/firefox\0-conten"..., 131072) = 192 +PS read(6, "", 130880) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/39544", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/39544/stat", O_RDONLY) = 6 +PS read(6, "39544 (Web Content) S 28043 2801"..., 2048) = 344 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/39544/status", O_RDONLY) = 6 +PS read(6, "Name:\tWeb Content\nUmask:\t0022\nSt"..., 2048) = 1163 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/39544/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/firefox/firefox\0-conten"..., 131072) = 192 +PS read(6, "", 130880) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/45266", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/45266/stat", O_RDONLY) = 6 +PS read(6, "45266 (spectacle) S 1 45265 4526"..., 2048) = 316 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/45266/status", O_RDONLY) = 6 +PS read(6, "Name:\tspectacle\nUmask:\t0022\nStat"..., 2048) = 1140 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/45266/cmdline", O_RDONLY) = 6 +PS read(6, "spectacle\0-brc\0", 131072) = 15 +PS read(6, "", 131057) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/45269", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/45269/stat", O_RDONLY) = 6 +PS read(6, "45269 (kglobalaccel5) S 610 4526"..., 2048) = 322 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/45269/status", O_RDONLY) = 6 +PS read(6, "Name:\tkglobalaccel5\nUmask:\t0022\n"..., 2048) = 1146 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/45269/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/bin/kglobalaccel5\0", 131072) = 23 +PS read(6, "", 131049) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/45456", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/45456/stat", O_RDONLY) = 6 +PS read(6, "45456 (dconf-service) S 610 4545"..., 2048) = 320 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/45456/status", O_RDONLY) = 6 +PS read(6, "Name:\tdconf-service\nUmask:\t0022\n"..., 2048) = 1142 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/45456/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/dconf-service\0", 131072) = 23 +PS read(6, "", 131049) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/45589", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/45589/stat", O_RDONLY) = 6 +PS read(6, "45589 (kworker/1:0-events) I 2 0"..., 2048) = 171 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/45589/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/1:0-events\nUmask:\t"..., 2048) = 751 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/45589/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/47028", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/47028/stat", O_RDONLY) = 6 +PS read(6, "47028 (kworker/0:0-events) I 2 0"..., 2048) = 171 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/47028/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/0:0-events\nUmask:\t"..., 2048) = 750 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/47028/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/49809", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/49809/stat", O_RDONLY) = 6 +PS read(6, "49809 (urxvt) S 1 49808 49808 0 "..., 2048) = 312 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/49809/status", O_RDONLY) = 6 +PS read(6, "Name:\turxvt\nUmask:\t0022\nState:\tS"..., 2048) = 1136 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/49809/cmdline", O_RDONLY) = 6 +PS read(6, "urxvt\0", 131072) = 6 +PS read(6, "", 131066) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/49810", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/49810/stat", O_RDONLY) = 6 +PS read(6, "49810 (zsh) S 49809 49810 49810 "..., 2048) = 330 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/49810/status", O_RDONLY) = 6 +PS read(6, "Name:\tzsh\nUmask:\t0022\nState:\tS ("..., 2048) = 1134 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/49810/cmdline", O_RDONLY) = 6 +PS read(6, "zsh\0", 131072) = 4 +PS read(6, "", 131068) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/dev/pts1", 0x7ffe1a081fc0, 0) = -1 ENOENT (No such file or directory) +PS newfstatat(AT_FDCWD, "/dev/pts/1", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x1), ...}, 0) = 0 +PS newfstatat(AT_FDCWD, "/proc/52141", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/52141/stat", O_RDONLY) = 6 +PS read(6, "52141 (RDD Process) S 28043 2801"..., 2048) = 329 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/52141/status", O_RDONLY) = 6 +PS read(6, "Name:\tRDD Process\nUmask:\t0022\nSt"..., 2048) = 1156 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/52141/cmdline", O_RDONLY) = 6 +PS read(6, "/usr/lib/firefox/firefox\0-conten"..., 131072) = 151 +PS read(6, "", 130921) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/55467", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/55467/stat", O_RDONLY) = 6 +PS read(6, "55467 (kworker/u16:0-events_free"..., 2048) = 193 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/55467/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/u16:0-events_freez"..., 2048) = 778 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/55467/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS write(1, "? 00:00:00 [kworker/4:1-e"..., 4096) = 4096 +GREP <... read resumed>"? 00:00:00 [kworker/4:1-e"..., 81920) = 4096 +PS newfstatat(AT_FDCWD, "/proc/64050", +GREP read(0, +PS <... newfstatat resumed>{st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/64050/stat", O_RDONLY) = 6 +PS read(6, "64050 (kworker/7:2-events) I 2 0"..., 2048) = 171 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/64050/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/7:2-events\nUmask:\t"..., 2048) = 750 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/64050/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/64396", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/64396/stat", O_RDONLY) = 6 +PS read(6, "64396 (urxvt) S 1 64395 64395 0 "..., 2048) = 314 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/64396/status", O_RDONLY) = 6 +PS read(6, "Name:\turxvt\nUmask:\t0022\nState:\tS"..., 2048) = 1136 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/64396/cmdline", O_RDONLY) = 6 +PS read(6, "urxvt\0", 131072) = 6 +PS read(6, "", 131066) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/64397", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/64397/stat", O_RDONLY) = 6 +PS read(6, "64397 (zsh) S 64396 64397 64397 "..., 2048) = 342 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/64397/status", O_RDONLY) = 6 +PS read(6, "Name:\tzsh\nUmask:\t0022\nState:\tS ("..., 2048) = 1138 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/64397/cmdline", O_RDONLY) = 6 +PS read(6, "zsh\0", 131072) = 4 +PS read(6, "", 131068) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/dev/pts3", 0x7ffe1a081fc0, 0) = -1 ENOENT (No such file or directory) +PS newfstatat(AT_FDCWD, "/dev/pts/3", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x3), ...}, 0) = 0 +PS newfstatat(AT_FDCWD, "/proc/65012", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/65012/stat", O_RDONLY) = 6 +PS read(6, "65012 (kworker/u16:6-events_unbo"..., 2048) = 184 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/65012/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/u16:6-events_unbou"..., 2048) = 769 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/65012/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/66339", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/66339/stat", O_RDONLY) = 6 +PS read(6, "66339 (sublime_text) R 1 66337 6"..., 2048) = 308 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/66339/status", O_RDONLY) = 6 +PS read(6, "Name:\tsublime_text\nUmask:\t0022\nS"..., 2048) = 1148 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/66339/cmdline", O_RDONLY) = 6 +PS read(6, "subl\0--detached\0.\0", 131072) = 18 +PS read(6, "", 131054) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/dev/pts3", 0x7ffe1a081fc0, 0) = -1 ENOENT (No such file or directory) +PS newfstatat(AT_FDCWD, "/dev/pts/3", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x3), ...}, 0) = 0 +PS newfstatat(AT_FDCWD, "/proc/66498", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/66498/stat", O_RDONLY) = 6 +PS read(6, "66498 (plugin_host-3.3) S 66339 "..., 2048) = 306 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/66498/status", O_RDONLY) = 6 +PS read(6, "Name:\tplugin_host-3.3\nUmask:\t002"..., 2048) = 1149 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/66498/cmdline", O_RDONLY) = 6 +PS read(6, "/opt/sublime_text/plugin_host-3."..., 131072) = 165 +PS read(6, "", 130907) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/dev/pts3", 0x7ffe1a081fc0, 0) = -1 ENOENT (No such file or directory) +PS newfstatat(AT_FDCWD, "/dev/pts/3", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x3), ...}, 0) = 0 +PS newfstatat(AT_FDCWD, "/proc/66501", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/66501/stat", O_RDONLY) = 6 +PS read(6, "66501 (plugin_host-3.8) S 66339 "..., 2048) = 312 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/66501/status", O_RDONLY) = 6 +PS read(6, "Name:\tplugin_host-3.8\nUmask:\t002"..., 2048) = 1149 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/66501/cmdline", O_RDONLY) = 6 +PS read(6, "/opt/sublime_text/plugin_host-3."..., 131072) = 165 +PS read(6, "", 130907) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/dev/pts3", 0x7ffe1a081fc0, 0) = -1 ENOENT (No such file or directory) +PS newfstatat(AT_FDCWD, "/dev/pts/3", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x3), ...}, 0) = 0 +PS newfstatat(AT_FDCWD, "/proc/70572", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/70572/stat", O_RDONLY) = 6 +PS read(6, "70572 (kworker/6:1-events) I 2 0"..., 2048) = 171 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/70572/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/6:1-events\nUmask:\t"..., 2048) = 751 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/70572/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/70574", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/70574/stat", O_RDONLY) = 6 +PS read(6, "70574 (kworker/5:1) I 2 0 0 0 -1"..., 2048) = 164 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/70574/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/5:1\nUmask:\t0000\nSt"..., 2048) = 740 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/70574/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/72138", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/72138/stat", O_RDONLY) = 6 +PS read(6, "72138 (kworker/u17:2-hci0) I 2 0"..., 2048) = 174 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/72138/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/u17:2-hci0\nUmask:\t"..., 2048) = 754 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/72138/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/73007", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/73007/stat", O_RDONLY) = 6 +PS read(6, "73007 (kworker/u17:3-hci0) I 2 0"..., 2048) = 174 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/73007/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/u17:3-hci0\nUmask:\t"..., 2048) = 754 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/73007/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/73874", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/73874/stat", O_RDONLY) = 6 +PS read(6, "73874 (urxvt) S 1 73873 73873 0 "..., 2048) = 313 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/73874/status", O_RDONLY) = 6 +PS read(6, "Name:\turxvt\nUmask:\t0022\nState:\tS"..., 2048) = 1134 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/73874/cmdline", O_RDONLY) = 6 +PS read(6, "urxvt\0", 131072) = 6 +PS read(6, "", 131066) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/73875", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/73875/stat", O_RDONLY) = 6 +PS read(6, "73875 (zsh) S 73874 73875 73875 "..., 2048) = 337 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/73875/status", O_RDONLY) = 6 +PS read(6, "Name:\tzsh\nUmask:\t0022\nState:\tS ("..., 2048) = 1136 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/73875/cmdline", O_RDONLY) = 6 +PS read(6, "zsh\0", 131072) = 4 +PS read(6, "", 131068) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/dev/pts0", 0x7ffe1a081fc0, 0) = -1 ENOENT (No such file or directory) +PS newfstatat(AT_FDCWD, "/dev/pts/0", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0), ...}, 0) = 0 +PS newfstatat(AT_FDCWD, "/proc/74082", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/74082/stat", O_RDONLY) = 6 +PS read(6, "74082 (kworker/u16:2-flush-8:0) "..., 2048) = 178 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/74082/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/u16:2-flush-8:0\nUm"..., 2048) = 760 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/74082/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/74351", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/74351/stat", O_RDONLY) = 6 +PS read(6, "74351 (kworker/u16:3-events_unbo"..., 2048) = 182 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/74351/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/u16:3-events_unbou"..., 2048) = 763 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/74351/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/75704", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/75704/stat", O_RDONLY) = 6 +PS read(6, "75704 (kworker/u17:0-hci0) I 2 0"..., 2048) = 174 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/75704/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/u17:0-hci0\nUmask:\t"..., 2048) = 754 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/75704/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/78207", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/78207/stat", O_RDONLY) = 6 +PS read(6, "78207 (kworker/u16:1) I 2 0 0 0 "..., 2048) = 166 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/78207/status", O_RDONLY) = 6 +PS read(6, "Name:\tkworker/u16:1\nUmask:\t0000\n"..., 2048) = 744 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/78207/cmdline", O_RDONLY) = 6 +PS read(6, "", 131072) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/proc/78697", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/78697/stat", O_RDONLY) = 6 +PS read(6, "78697 (strace) S 64397 78697 643"..., 2048) = 326 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/78697/status", O_RDONLY) = 6 +PS read(6, "Name:\tstrace\nUmask:\t0022\nState:\t"..., 2048) = 1140 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/78697/cmdline", O_RDONLY) = 6 +PS read(6, "strace\0-o\0pipeline.log\0-f\0dash\0", 131072) = 31 +PS read(6, "", 131041) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/dev/pts3", 0x7ffe1a081fc0, 0) = -1 ENOENT (No such file or directory) +PS newfstatat(AT_FDCWD, "/dev/pts/3", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x3), ...}, 0) = 0 +PS newfstatat(AT_FDCWD, "/proc/DASH", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/DASH/stat", O_RDONLY) = 6 +PS read(6, "DASH (dash) S 78697 DASH 64397"..., 2048) = 321 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/DASH/status", O_RDONLY) = 6 +PS read(6, "Name:\tdash\nUmask:\t0022\nState:\tS "..., 2048) = 1140 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/DASH/cmdline", O_RDONLY) = 6 +PS read(6, "dash\0", 131072) = 5 +PS read(6, "", 131067) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/dev/pts3", 0x7ffe1a081fc0, 0) = -1 ENOENT (No such file or directory) +PS newfstatat(AT_FDCWD, "/dev/pts/3", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x3), ...}, 0) = 0 +PS newfstatat(AT_FDCWD, "/proc/PS", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/PS/stat", O_RDONLY) = 6 +PS read(6, "PS (ps) R DASH PS 64397 3"..., 2048) = 319 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/PS/status", O_RDONLY) = 6 +PS read(6, "Name:\tps\nUmask:\t0022\nState:\tR (r"..., 2048) = 1138 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/PS/cmdline", O_RDONLY) = 6 +PS read(6, "ps\0-ef\0", 131072) = 7 +PS read(6, "", 131065) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/dev/pts3", 0x7ffe1a081fc0, 0) = -1 ENOENT (No such file or directory) +PS newfstatat(AT_FDCWD, "/dev/pts/3", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x3), ...}, 0) = 0 +PS newfstatat(AT_FDCWD, "/proc/GREP", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/GREP/stat", O_RDONLY) = 6 +PS read(6, "GREP (grep) S DASH PS 64397"..., 2048) = 314 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/GREP/status", O_RDONLY) = 6 +PS read(6, "Name:\tgrep\nUmask:\t0022\nState:\tS "..., 2048) = 1140 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/GREP/cmdline", O_RDONLY) = 6 +PS read(6, "grep\0sh\0", 131072) = 8 +PS read(6, "", 131064) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/dev/pts3", 0x7ffe1a081fc0, 0) = -1 ENOENT (No such file or directory) +PS newfstatat(AT_FDCWD, "/dev/pts/3", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x3), ...}, 0) = 0 +PS newfstatat(AT_FDCWD, "/proc/WC", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +PS openat(AT_FDCWD, "/proc/WC/stat", O_RDONLY) = 6 +PS read(6, "WC (wc) S DASH PS 64397 3"..., 2048) = 308 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/WC/status", O_RDONLY) = 6 +PS read(6, "Name:\twc\nUmask:\t0022\nState:\tS (s"..., 2048) = 1138 +PS close(6) = 0 +PS openat(AT_FDCWD, "/proc/WC/cmdline", O_RDONLY) = 6 +PS read(6, "wc\0-l\0", 131072) = 6 +PS read(6, "", 131066) = 0 +PS close(6) = 0 +PS newfstatat(AT_FDCWD, "/dev/pts3", 0x7ffe1a081fc0, 0) = -1 ENOENT (No such file or directory) +PS newfstatat(AT_FDCWD, "/dev/pts/3", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x3), ...}, 0) = 0 +PS getdents64(5, 0x5599d4d670c0 /* 0 entries */, 32768) = 0 +PS close(5) = 0 +PS write(1, " 2 1 20:20 ? 00:01:"..., 1867) = 1867 +GREP <... read resumed>" 2 1 20:20 ? 00:01:"..., 77824) = 1867 +PS close(1 +GREP read(0, +PS <... close resumed>) = 0 +GREP <... read resumed>"", 77824) = 0 +PS close(2 +GREP write(1, "faultCookies,SpareRendererForSit"..., 782 +PS <... close resumed>) = 0 +GREP <... write resumed>) = 782 +WC <... read resumed>"faultCookies,SpareRendererForSit"..., 16320) = 782 +GREP close(1 +WC read(0, +GREP <... close resumed>) = 0 +WC <... read resumed>"", 16320) = 0 +PS exit_group(0 +WC newfstatat(1, "", +GREP close(2 +WC <... newfstatat resumed>{st_mode=S_IFREG|0644, st_size=0, ...}, AT_EMPTY_PATH) = 0 +PS <... exit_group resumed>) = ? +GREP <... close resumed>) = 0 +WC write(1, "20\n", 3 +GREP exit_group(0) = ? +WC <... write resumed>) = 3 +WC close(0) = 0 +WC close(1) = 0 +GREP +++ exited with 0 +++ +WC close(2 +DASH <... wait4 resumed>[{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WSTOPPED, NULL) = GREP +WC <... close resumed>) = 0 +PS +++ exited with 0 +++ +DASH --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=GREP, si_uid=1000, si_status=0, si_utime=0, si_stime=0} --- +WC exit_group(0 +DASH rt_sigreturn({mask=[]} +WC <... exit_group resumed>) = ? +DASH <... rt_sigreturn resumed>) = GREP +DASH --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=PS, si_uid=1000, si_status=0, si_utime=1, si_stime=1} --- +DASH rt_sigreturn({mask=[]}) = GREP +DASH wait4(-1, +WC +++ exited with 0 +++ +DASH <... wait4 resumed>[{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WSTOPPED, NULL) = PS +DASH --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=WC, si_uid=1000, si_status=0, si_utime=0, si_stime=0} --- +DASH rt_sigreturn({mask=[]}) = PS +DASH wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WSTOPPED, NULL) = WC +DASH wait4(-1, 0x7ffd6d776d8c, WNOHANG|WSTOPPED, NULL) = -1 ECHILD (No child processes) +DASH ioctl(10, TIOCSPGRP, [DASH]) = 0 +DASH newfstatat(AT_FDCWD, "/var/spool/mail/framal", 0x7ffd6d776ec0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/frama", 0x7ffd6d776ec0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/fram", 0x7ffd6d776ec0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/fra", 0x7ffd6d776ec0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/fr", 0x7ffd6d776ec0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/f", 0x7ffd6d776ec0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}, 0) = 0 +DASH newfstatat(AT_FDCWD, "/var/spool/mail", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}, 0) = 0 +DASH newfstatat(AT_FDCWD, "/var/spool/mai", 0x7ffd6d776ec0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/ma", 0x7ffd6d776ec0, 0) = -1 ENOENT (No such file or directory) +DASH write(2, "$ ", 2) = 2 +DASH read(0, "exit 42\n", 8192) = 8 +DASH ioctl(10, TIOCSPGRP, [78697]) = 0 +DASH setpgid(0, 78697) = 0 +DASH close(10) = 0 +DASH exit_group(42) = ? +DASH +++ exited with 42 +++ diff --git a/semestr-5/so/lista4/pipeline2.log b/semestr-5/so/lista4/pipeline2.log new file mode 100644 index 0000000..8122a4a --- /dev/null +++ b/semestr-5/so/lista4/pipeline2.log @@ -0,0 +1,3409 @@ +DASH execve("/usr/bin/dash", ["dash"], 0x7ffe4d2dda48 /* 40 vars */) = 0 +DASH brk(NULL) = 0x560e11978000 +DASH arch_prctl(0x3001 /* ARCH_??? */, 0x7ffe0e73b0f0) = -1 EINVAL (Invalid argument) +DASH access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) +DASH openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 +DASH newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=92088, ...}, AT_EMPTY_PATH) = 0 +DASH mmap(NULL, 92088, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f5f036f2000 +DASH close(3) = 0 +DASH openat(AT_FDCWD, "/usr/lib/libedit.so.0", O_RDONLY|O_CLOEXEC) = 3 +DASH read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \220\0\0\0\0\0\0"..., 832) = 832 +DASH newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=223144, ...}, AT_EMPTY_PATH) = 0 +DASH mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5f036f0000 +DASH mmap(NULL, 240792, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f5f036b5000 +DASH mprotect(0x7f5f036be000, 180224, PROT_NONE) = 0 +DASH mmap(0x7f5f036be000, 118784, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9000) = 0x7f5f036be000 +DASH mmap(0x7f5f036db000, 57344, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f5f036db000 +DASH mmap(0x7f5f036ea000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x34000) = 0x7f5f036ea000 +DASH mmap(0x7f5f036ed000, 11416, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f5f036ed000 +DASH close(3) = 0 +DASH openat(AT_FDCWD, "/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 +DASH read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`|\2\0\0\0\0\0"..., 832) = 832 +DASH pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784 +DASH pread64(3, "\4\0\0\0@\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0"..., 80, 848) = 80 +DASH pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0K@g7\5w\10\300\344\306B4Zp\0\1\0\0\0 p\1\0\0\0\0\0"..., 832) = 832 +DASH newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=453688, ...}, AT_EMPTY_PATH) = 0 +DASH mmap(NULL, 457976, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f5f03479000 +DASH mmap(0x7f5f03490000, 241664, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7f5f03490000 +DASH mmap(0x7f5f034cb000, 98304, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x52000) = 0x7f5f034cb000 +DASH mmap(0x7f5f034e3000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x69000) = 0x7f5f034e3000 +DASH close(3) = 0 +DASH mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5f03476000 +DASH arch_prctl(ARCH_SET_FS, 0x7f5f03476740) = 0 +DASH mprotect(0x7f5f036a6000, 12288, PROT_READ) = 0 +DASH mprotect(0x7f5f034e3000, 20480, PROT_READ) = 0 +DASH mprotect(0x7f5f036ea000, 8192, PROT_READ) = 0 +DASH mprotect(0x560e0ff2a000, 8192, PROT_READ) = 0 +DASH mprotect(0x7f5f03737000, 8192, PROT_READ) = 0 +DASH munmap(0x7f5f036f2000, 92088) = 0 +DASH getpid() = DASH +DASH rt_sigaction(SIGCHLD, {sa_handler=0x560e0ff1fd40, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f5f03525da0}, NULL, 8) = 0 +DASH geteuid() = 1000 +DASH brk(NULL) = 0x560e11978000 +DASH brk(0x560e11999000) = 0x560e11999000 +DASH getppid() = 101510 +DASH newfstatat(AT_FDCWD, "/home/framal/Documents/wmiuwr/semestr-5/so/lista4", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0 +DASH newfstatat(AT_FDCWD, ".", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0 +DASH ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0 +DASH ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0 +DASH rt_sigaction(SIGINT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 +DASH rt_sigaction(SIGINT, {sa_handler=0x560e0ff1fd40, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f5f03525da0}, NULL, 8) = 0 +DASH rt_sigaction(SIGQUIT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 +DASH rt_sigaction(SIGQUIT, {sa_handler=SIG_IGN, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f5f03525da0}, NULL, 8) = 0 +DASH rt_sigaction(SIGTERM, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 +DASH rt_sigaction(SIGTERM, {sa_handler=SIG_IGN, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f5f03525da0}, NULL, 8) = 0 +DASH openat(AT_FDCWD, "/dev/tty", O_RDWR) = 3 +DASH fcntl(3, F_DUPFD, 10) = 10 +DASH close(3) = 0 +DASH fcntl(10, F_SETFD, FD_CLOEXEC) = 0 +DASH ioctl(10, TIOCGPGRP, [101510]) = 0 +DASH getpgrp() = 101510 +DASH rt_sigaction(SIGTSTP, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 +DASH rt_sigaction(SIGTSTP, {sa_handler=SIG_IGN, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f5f03525da0}, NULL, 8) = 0 +DASH rt_sigaction(SIGTTOU, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 +DASH rt_sigaction(SIGTTOU, {sa_handler=SIG_IGN, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f5f03525da0}, NULL, 8) = 0 +DASH rt_sigaction(SIGTTIN, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 +DASH rt_sigaction(SIGTTIN, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f5f03525da0}, NULL, 8) = 0 +DASH setpgid(0, DASH) = 0 +DASH ioctl(10, TIOCSPGRP, [DASH]) = 0 +DASH newfstatat(AT_FDCWD, "/var/spool/mail/framal", 0x7ffe0e73afd0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/frama", 0x7ffe0e73afd0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/fram", 0x7ffe0e73afd0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/fra", 0x7ffe0e73afd0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/fr", 0x7ffe0e73afd0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/f", 0x7ffe0e73afd0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}, 0) = 0 +DASH newfstatat(AT_FDCWD, "/var/spool/mail", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}, 0) = 0 +DASH newfstatat(AT_FDCWD, "/var/spool/mai", 0x7ffe0e73afd0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/ma", 0x7ffe0e73afd0, 0) = -1 ENOENT (No such file or directory) +DASH write(2, "$ ", 2) = 2 +DASH read(0, "ps -ef | grep sh | wc -l > cnt\n", 8192) = 31 +DASH newfstatat(AT_FDCWD, "/home/framal/.scripts/ps", 0x7ffe0e73af10, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/home/framal/.local/bin/ps", 0x7ffe0e73af10, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/usr/local/bin/ps", 0x7ffe0e73af10, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/usr/bin/ps", {st_mode=S_IFREG|0755, st_size=137504, ...}, 0) = 0 +DASH pipe([3, 4]) = 0 +DASH clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f5f03476a10) = 101575 +DASH setpgid(101575, 101575) = 0 +DASH close(4) = 0 +101575 getpid( +DASH newfstatat(AT_FDCWD, "/home/framal/.scripts/grep", 0x7ffe0e73af10, 0) = -1 ENOENT (No such file or directory) +101575 <... getpid resumed>) = 101575 +DASH newfstatat(AT_FDCWD, "/home/framal/.local/bin/grep", +101575 setpgid(0, 101575 +DASH <... newfstatat resumed>0x7ffe0e73af10, 0) = -1 ENOENT (No such file or directory) +101575 <... setpgid resumed>) = 0 +DASH newfstatat(AT_FDCWD, "/usr/local/bin/grep", +101575 ioctl(10, TIOCSPGRP, [101575] +DASH <... newfstatat resumed>0x7ffe0e73af10, 0) = -1 ENOENT (No such file or directory) +101575 <... ioctl resumed>) = 0 +DASH newfstatat(AT_FDCWD, "/usr/bin/grep", +101575 rt_sigaction(SIGTSTP, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f5f03525da0}, +DASH <... newfstatat resumed>{st_mode=S_IFREG|0755, st_size=235824, ...}, 0) = 0 +101575 <... rt_sigaction resumed>NULL, 8) = 0 +DASH pipe( +101575 rt_sigaction(SIGTTOU, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f5f03525da0}, +DASH <... pipe resumed>[4, 5]) = 0 +101575 <... rt_sigaction resumed>NULL, 8) = 0 +DASH clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD +101575 rt_sigaction(SIGINT, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f5f03525da0}, NULL, 8) = 0 +101575 rt_sigaction(SIGQUIT, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f5f03525da0}, NULL, 8) = 0 +101575 rt_sigaction(SIGTERM, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f5f03525da0}, NULL, 8) = 0 +DASH <... clone resumed>, child_tidptr=0x7f5f03476a10) = 101576 +101575 close(3 +DASH setpgid(101576, 101575 +101575 <... close resumed>) = 0 +DASH <... setpgid resumed>) = 0 +101576 setpgid(0, 101575 +101575 dup2(4, 1 +DASH close(3 +101575 <... dup2 resumed>) = 1 +DASH <... close resumed>) = 0 +101576 <... setpgid resumed>) = 0 +101575 close(4 +DASH close(5 +101575 <... close resumed>) = 0 +DASH <... close resumed>) = 0 +DASH newfstatat(AT_FDCWD, "/home/framal/.scripts/wc", +101576 ioctl(10, TIOCSPGRP, [101575] +101575 execve("/usr/bin/ps", ["ps", "-ef"], 0x560e11978be0 /* 40 vars */ +DASH <... newfstatat resumed>0x7ffe0e73af10, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/home/framal/.local/bin/wc", +101576 <... ioctl resumed>) = 0 +DASH <... newfstatat resumed>0x7ffe0e73af10, 0) = -1 ENOENT (No such file or directory) +101576 rt_sigaction(SIGTSTP, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f5f03525da0}, +DASH newfstatat(AT_FDCWD, "/usr/local/bin/wc", +101576 <... rt_sigaction resumed>NULL, 8) = 0 +DASH <... newfstatat resumed>0x7ffe0e73af10, 0) = -1 ENOENT (No such file or directory) +101576 rt_sigaction(SIGTTOU, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f5f03525da0}, +DASH newfstatat(AT_FDCWD, "/usr/bin/wc", +101576 <... rt_sigaction resumed>NULL, 8) = 0 +DASH <... newfstatat resumed>{st_mode=S_IFREG|0755, st_size=51400, ...}, 0) = 0 +101576 rt_sigaction(SIGINT, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f5f03525da0}, +DASH clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD +101575 <... execve resumed>) = 0 +101576 <... rt_sigaction resumed>NULL, 8) = 0 +101576 rt_sigaction(SIGQUIT, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f5f03525da0}, +101575 brk(NULL +101576 <... rt_sigaction resumed>NULL, 8) = 0 +101575 <... brk resumed>) = 0x55ec68e38000 +101576 rt_sigaction(SIGTERM, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f5f03525da0}, +DASH <... clone resumed>, child_tidptr=0x7f5f03476a10) = 101577 +101575 arch_prctl(0x3001 /* ARCH_??? */, 0x7ffd9e0687e0 +DASH setpgid(101577, 101575 +101577 setpgid(0, 101575 +101576 <... rt_sigaction resumed>NULL, 8) = 0 +101575 <... arch_prctl resumed>) = -1 EINVAL (Invalid argument) +DASH <... setpgid resumed>) = 0 +101577 <... setpgid resumed>) = 0 +101576 close(4 +DASH close(4 +101577 ioctl(10, TIOCSPGRP, [101575] +101575 access("/etc/ld.so.preload", R_OK +101576 <... close resumed>) = 0 +DASH <... close resumed>) = 0 +101577 <... ioctl resumed>) = 0 +101575 <... access resumed>) = -1 ENOENT (No such file or directory) +DASH close(-1 +101577 rt_sigaction(SIGTSTP, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f5f03525da0}, +101576 dup2(3, 0 +DASH <... close resumed>) = -1 EBADF (Bad file descriptor) +101577 <... rt_sigaction resumed>NULL, 8) = 0 +101575 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC +101576 <... dup2 resumed>) = 0 +DASH wait4(-1, +101577 rt_sigaction(SIGTTOU, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f5f03525da0}, +101575 <... openat resumed>) = 3 +101576 close(3 +101577 <... rt_sigaction resumed>NULL, 8) = 0 +101575 newfstatat(3, "", +101577 rt_sigaction(SIGINT, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f5f03525da0}, +101576 <... close resumed>) = 0 +101577 <... rt_sigaction resumed>NULL, 8) = 0 +101575 <... newfstatat resumed>{st_mode=S_IFREG|0644, st_size=92088, ...}, AT_EMPTY_PATH) = 0 +101577 rt_sigaction(SIGQUIT, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f5f03525da0}, +101576 dup2(5, 1 +101575 mmap(NULL, 92088, PROT_READ, MAP_PRIVATE, 3, 0 +101577 <... rt_sigaction resumed>NULL, 8) = 0 +101576 <... dup2 resumed>) = 1 +101577 rt_sigaction(SIGTERM, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f5f03525da0}, +101575 <... mmap resumed>) = 0x7f7e0d13b000 +101576 close(5 +101577 <... rt_sigaction resumed>NULL, 8) = 0 +101575 close(3 +101576 <... close resumed>) = 0 +101577 dup2(4, 0 +101575 <... close resumed>) = 0 +101577 <... dup2 resumed>) = 0 +101576 execve("/usr/bin/grep", ["grep", "sh"], 0x560e11978be0 /* 40 vars */ +101577 close(4 +101575 openat(AT_FDCWD, "/usr/lib/libprocps.so.8", O_RDONLY|O_CLOEXEC +101577 <... close resumed>) = 0 +101575 <... openat resumed>) = 3 +101577 openat(AT_FDCWD, "cnt", O_WRONLY|O_CREAT|O_TRUNC, 0666 +101575 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 P\0\0\0\0\0\0"..., 832) = 832 +101575 newfstatat(3, "", +101577 <... openat resumed>) = 3 +101575 <... newfstatat resumed>{st_mode=S_IFREG|0755, st_size=83848, ...}, AT_EMPTY_PATH) = 0 +101577 fcntl(1, F_DUPFD, 10) = 11 +101575 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 +101577 close(1 +101576 <... execve resumed>) = 0 +101577 <... close resumed>) = 0 +101575 <... mmap resumed>) = 0x7f7e0d139000 +101577 fcntl(11, F_SETFD, FD_CLOEXEC +101575 mmap(NULL, 229408, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0 +101577 <... fcntl resumed>) = 0 +101576 brk(NULL +101577 dup2(3, 1 +101575 <... mmap resumed>) = 0x7f7e0d100000 +101576 <... brk resumed>) = 0x55ee4fc20000 +101577 <... dup2 resumed>) = 1 +101575 mmap(0x7f7e0d105000, 40960, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5000 +101577 close(3 +101576 arch_prctl(0x3001 /* ARCH_??? */, 0x7ffd229c07e0 +101577 <... close resumed>) = 0 +101575 <... mmap resumed>) = 0x7f7e0d105000 +101576 <... arch_prctl resumed>) = -1 EINVAL (Invalid argument) +101577 execve("/usr/bin/wc", ["wc", "-l"], 0x560e11978bf8 /* 40 vars */ +101575 mmap(0x7f7e0d10f000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf000 +101576 access("/etc/ld.so.preload", R_OK +101575 <... mmap resumed>) = 0x7f7e0d10f000 +101576 <... access resumed>) = -1 ENOENT (No such file or directory) +101575 mmap(0x7f7e0d113000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12000 +101576 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC +101575 <... mmap resumed>) = 0x7f7e0d113000 +101576 <... openat resumed>) = 3 +101575 mmap(0x7f7e0d116000, 139296, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0 +101576 newfstatat(3, "", +101575 <... mmap resumed>) = 0x7f7e0d116000 +101576 <... newfstatat resumed>{st_mode=S_IFREG|0644, st_size=92088, ...}, AT_EMPTY_PATH) = 0 +101575 close(3 +101576 mmap(NULL, 92088, PROT_READ, MAP_PRIVATE, 3, 0 +101575 <... close resumed>) = 0 +101577 <... execve resumed>) = 0 +101576 <... mmap resumed>) = 0x7f1494e0c000 +101575 openat(AT_FDCWD, "/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC +101576 close(3 +101575 <... openat resumed>) = 3 +101577 brk(NULL +101576 <... close resumed>) = 0 +101577 <... brk resumed>) = 0x55b3e2fae000 +101575 read(3, +101576 openat(AT_FDCWD, "/usr/lib/libpcre.so.1", O_RDONLY|O_CLOEXEC +101577 arch_prctl(0x3001 /* ARCH_??? */, 0x7ffd9033f8c0 +101575 <... read resumed>"\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`|\2\0\0\0\0\0"..., 832) = 832 +101577 <... arch_prctl resumed>) = -1 EINVAL (Invalid argument) +101576 <... openat resumed>) = 3 +101575 pread64(3, +101576 read(3, +101577 access("/etc/ld.so.preload", R_OK +101575 <... pread64 resumed>"\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784 +101577 <... access resumed>) = -1 ENOENT (No such file or directory) +101576 <... read resumed>"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \0\0\0\0\0\0"..., 832) = 832 +101575 pread64(3, +101577 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC +101576 newfstatat(3, "", +101575 <... pread64 resumed>"\4\0\0\0@\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0"..., 80, 848) = 80 +101577 <... openat resumed>) = 3 +101576 <... newfstatat resumed>{st_mode=S_IFREG|0755, st_size=481072, ...}, AT_EMPTY_PATH) = 0 +101575 pread64(3, +101577 newfstatat(3, "", +101576 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 +101575 <... pread64 resumed>"\4\0\0\0\24\0\0\0\3\0\0\0GNU\0K@g7\5w\10\300\344\306B4Zp{st_mode=S_IFREG|0644, st_size=92088, ...}, AT_EMPTY_PATH) = 0 +101576 <... mmap resumed>) = 0x7f1494e0a000 +101577 mmap(NULL, 92088, PROT_READ, MAP_PRIVATE, 3, 0 +101575 newfstatat(3, "", +101577 <... mmap resumed>) = 0x7f8f72620000 +101576 mmap(NULL, 483592, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0 +101577 close(3 +101575 <... newfstatat resumed>{st_mode=S_IFREG|0755, st_size=2150424, ...}, AT_EMPTY_PATH) = 0 +101577 <... close resumed>) = 0 +101576 <... mmap resumed>) = 0x7f1494d93000 +101575 pread64(3, +101577 openat(AT_FDCWD, "/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC +101576 mmap(0x7f1494d95000, 352256, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000 +101575 <... pread64 resumed>"\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784 +101577 <... openat resumed>) = 3 +101576 <... mmap resumed>) = 0x7f1494d95000 +101577 read(3, +101575 mmap(NULL, 1880536, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0 +101577 <... read resumed>"\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`|\2\0\0\0\0\0"..., 832) = 832 +101576 mmap(0x7f1494deb000, 118784, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x58000 +101577 pread64(3, +101575 <... mmap resumed>) = 0x7f7e0cf34000 +101577 <... pread64 resumed>"\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784 +101576 <... mmap resumed>) = 0x7f1494deb000 +101577 pread64(3, +101575 mmap(0x7f7e0cf5a000, 1355776, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000 +101576 mmap(0x7f1494e08000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x74000 +101577 <... pread64 resumed>"\4\0\0\0@\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0"..., 80, 848) = 80 +101576 <... mmap resumed>) = 0x7f1494e08000 +101575 <... mmap resumed>) = 0x7f7e0cf5a000 +101577 pread64(3, +101575 mmap(0x7f7e0d0a5000, 311296, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x171000 +101577 <... pread64 resumed>"\4\0\0\0\24\0\0\0\3\0\0\0GNU\0K@g7\5w\10\300\344\306B4Zp +101577 newfstatat(3, "", +101575 <... mmap resumed>) = 0x7f7e0d0a5000 +101576 <... close resumed>) = 0 +101577 <... newfstatat resumed>{st_mode=S_IFREG|0755, st_size=2150424, ...}, AT_EMPTY_PATH) = 0 +101575 mmap(0x7f7e0d0f1000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bc000 +101577 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 +101576 openat(AT_FDCWD, "/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC +101577 <... mmap resumed>) = 0x7f8f7261e000 +101575 <... mmap resumed>) = 0x7f7e0d0f1000 +101577 pread64(3, +101576 <... openat resumed>) = 3 +101577 <... pread64 resumed>"\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784 +101575 mmap(0x7f7e0d0f7000, 33240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0 +101576 read(3, +101577 mmap(NULL, 1880536, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0 +101575 <... mmap resumed>) = 0x7f7e0d0f7000 +101577 <... mmap resumed>) = 0x7f8f72452000 +101576 <... read resumed>"\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`|\2\0\0\0\0\0"..., 832) = 832 +101577 mmap(0x7f8f72478000, 1355776, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000 +101575 close(3 +101576 pread64(3, +101577 <... mmap resumed>) = 0x7f8f72478000 +101575 <... close resumed>) = 0 +101576 <... pread64 resumed>"\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784 +101577 mmap(0x7f8f725c3000, 311296, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x171000 +101575 openat(AT_FDCWD, "/usr/lib/libsystemd.so.0", O_RDONLY|O_CLOEXEC +101577 <... mmap resumed>) = 0x7f8f725c3000 +101576 pread64(3, +101577 mmap(0x7f8f7260f000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bc000 +101575 <... openat resumed>) = 3 +101576 <... pread64 resumed>"\4\0\0\0@\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0"..., 80, 848) = 80 +101577 <... mmap resumed>) = 0x7f8f7260f000 +101575 read(3, +101576 pread64(3, +101577 mmap(0x7f8f72615000, 33240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0 +101575 <... read resumed>"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@@\1\0\0\0\0\0"..., 832) = 832 +101576 <... pread64 resumed>"\4\0\0\0\24\0\0\0\3\0\0\0GNU\0K@g7\5w\10\300\344\306B4Zp) = 0x7f8f72615000 +101575 newfstatat(3, "", +101576 newfstatat(3, "", +101577 close(3 +101575 <... newfstatat resumed>{st_mode=S_IFREG|0755, st_size=799560, ...}, AT_EMPTY_PATH) = 0 +101576 <... newfstatat resumed>{st_mode=S_IFREG|0755, st_size=2150424, ...}, AT_EMPTY_PATH) = 0 +101577 <... close resumed>) = 0 +101575 mmap(NULL, 804192, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0 +101576 pread64(3, +101577 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 +101575 <... mmap resumed>) = 0x7f7e0ce6f000 +101577 <... mmap resumed>) = 0x7f8f72450000 +101576 <... pread64 resumed>"\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784 +101575 mmap(0x7f7e0ce83000, 507904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14000 +101577 arch_prctl(ARCH_SET_FS, 0x7f8f7261f600 +101576 mmap(NULL, 1880536, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0 +101577 <... arch_prctl resumed>) = 0 +101575 <... mmap resumed>) = 0x7f7e0ce83000 +101576 <... mmap resumed>) = 0x7f1494bc7000 +101575 mmap(0x7f7e0ceff000, 180224, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x90000 +101576 mmap(0x7f1494bed000, 1355776, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000 +101575 <... mmap resumed>) = 0x7f7e0ceff000 +101576 <... mmap resumed>) = 0x7f1494bed000 +101575 mmap(0x7f7e0cf2b000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xbb000 +101577 mprotect(0x7f8f7260f000, 12288, PROT_READ +101576 mmap(0x7f1494d38000, 311296, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x171000 +101577 <... mprotect resumed>) = 0 +101575 <... mmap resumed>) = 0x7f7e0cf2b000 +101576 <... mmap resumed>) = 0x7f1494d38000 +101575 mmap(0x7f7e0cf33000, 1376, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0 +101576 mmap(0x7f1494d84000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bc000 +101577 mprotect(0x55b3e1ae7000, 4096, PROT_READ +101575 <... mmap resumed>) = 0x7f7e0cf33000 +101577 <... mprotect resumed>) = 0 +101576 <... mmap resumed>) = 0x7f1494d84000 +101577 mprotect(0x7f8f72665000, 8192, PROT_READ +101575 close(3 +101577 <... mprotect resumed>) = 0 +101576 mmap(0x7f1494d8a000, 33240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0 +101575 <... close resumed>) = 0 +101577 munmap(0x7f8f72620000, 92088 +101576 <... mmap resumed>) = 0x7f1494d8a000 +101575 openat(AT_FDCWD, "/usr/lib/libdl.so.2", O_RDONLY|O_CLOEXEC +101577 <... munmap resumed>) = 0 +101576 close(3 +101575 <... openat resumed>) = 3 +101576 <... close resumed>) = 0 +101575 read(3, +101576 openat(AT_FDCWD, "/usr/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC +101575 <... read resumed>"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\"\0\0\0\0\0\0"..., 832) = 832 +101577 brk(NULL +101576 <... openat resumed>) = 3 +101577 <... brk resumed>) = 0x55b3e2fae000 +101575 newfstatat(3, "", +101577 brk(0x55b3e2fcf000 +101576 read(3, +101577 <... brk resumed>) = 0x55b3e2fcf000 +101575 <... newfstatat resumed>{st_mode=S_IFREG|0755, st_size=22704, ...}, AT_EMPTY_PATH) = 0 +101577 openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC +101576 <... read resumed>"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\200\0\0\0\0\0\0"..., 832) = 832 +101577 <... openat resumed>) = 3 +101575 mmap(NULL, 24720, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0 +101577 newfstatat(3, "", +101576 pread64(3, +101577 <... newfstatat resumed>{st_mode=S_IFREG|0644, st_size=3362224, ...}, AT_EMPTY_PATH) = 0 +101575 <... mmap resumed>) = 0x7f7e0ce68000 +101577 mmap(NULL, 3362224, PROT_READ, MAP_PRIVATE, 3, 0 +101576 <... pread64 resumed>"\4\0\0\0@\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0"..., 80, 792) = 80 +101575 mmap(0x7f7e0ce6a000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000 +101577 <... mmap resumed>) = 0x7f8f7211b000 +101576 pread64(3, +101575 <... mmap resumed>) = 0x7f7e0ce6a000 +101577 close(3 +101576 <... pread64 resumed>"\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\7\310\371[O2Q\320\205P!z\330\241\363\20"..., 68, 872) = 68 +101575 mmap(0x7f7e0ce6c000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4000 +101577 <... close resumed>) = 0 +101576 newfstatat(3, "", +101575 <... mmap resumed>) = 0x7f7e0ce6c000 +101576 <... newfstatat resumed>{st_mode=S_IFREG|0755, st_size=154040, ...}, AT_EMPTY_PATH) = 0 +101575 mmap(0x7f7e0ce6d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4000 +101576 mmap(NULL, 131472, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0 +101577 openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC +101575 <... mmap resumed>) = 0x7f7e0ce6d000 +101577 <... openat resumed>) = 3 +101576 <... mmap resumed>) = 0x7f1494ba6000 +101577 newfstatat(3, "", +101575 close(3 +101577 <... newfstatat resumed>{st_mode=S_IFREG|0644, st_size=2998, ...}, AT_EMPTY_PATH) = 0 +101576 mprotect(0x7f1494bad000, 81920, PROT_NONE +101575 <... close resumed>) = 0 +101577 read(3, +101576 <... mprotect resumed>) = 0 +101577 <... read resumed>"# Locale name alias data base.\n#"..., 4096) = 2998 +101575 openat(AT_FDCWD, "/usr/lib/librt.so.1", O_RDONLY|O_CLOEXEC +101576 mmap(0x7f1494bad000, 61440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000 +101577 read(3, +101575 <... openat resumed>) = 3 +101577 <... read resumed>"", 4096) = 0 +101576 <... mmap resumed>) = 0x7f1494bad000 +101577 close(3 +101575 read(3, +101576 mmap(0x7f1494bbc000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000 +101577 <... close resumed>) = 0 +101575 <... read resumed>"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\2207\0\0\0\0\0\0"..., 832) = 832 +101576 <... mmap resumed>) = 0x7f1494bbc000 +101575 newfstatat(3, "", +101577 openat(AT_FDCWD, "/usr/share/locale/en_US.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY +101576 mmap(0x7f1494bc1000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a000 +101577 <... openat resumed>) = -1 ENOENT (No such file or directory) +101575 <... newfstatat resumed>{st_mode=S_IFREG|0755, st_size=39408, ...}, AT_EMPTY_PATH) = 0 +101577 openat(AT_FDCWD, "/usr/share/locale/en_US.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY +101576 <... mmap resumed>) = 0x7f1494bc1000 +101577 <... openat resumed>) = -1 ENOENT (No such file or directory) +101575 mmap(NULL, 43520, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0 +101577 openat(AT_FDCWD, "/usr/share/locale/en_US/LC_MESSAGES/coreutils.mo", O_RDONLY +101576 mmap(0x7f1494bc3000, 12688, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0 +101577 <... openat resumed>) = -1 ENOENT (No such file or directory) +101575 <... mmap resumed>) = 0x7f7e0ce5d000 +101577 openat(AT_FDCWD, "/usr/share/locale/en.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY +101576 <... mmap resumed>) = 0x7f1494bc3000 +101575 mmap(0x7f7e0ce60000, 16384, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000 +101577 <... openat resumed>) = -1 ENOENT (No such file or directory) +101576 close(3 +101575 <... mmap resumed>) = 0x7f7e0ce60000 +101577 openat(AT_FDCWD, "/usr/share/locale/en.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY +101576 <... close resumed>) = 0 +101575 mmap(0x7f7e0ce64000, 8192, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000 +101577 <... openat resumed>) = -1 ENOENT (No such file or directory) +101576 mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 +101575 <... mmap resumed>) = 0x7f7e0ce64000 +101577 openat(AT_FDCWD, "/usr/share/locale/en/LC_MESSAGES/coreutils.mo", O_RDONLY +101576 <... mmap resumed>) = 0x7f1494ba3000 +101577 <... openat resumed>) = -1 ENOENT (No such file or directory) +101575 mmap(0x7f7e0ce66000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000 +101577 fadvise64(0, 0, 0, POSIX_FADV_SEQUENTIAL +101576 arch_prctl(ARCH_SET_FS, 0x7f1494ba3740 +101577 <... fadvise64 resumed>) = -1 ESPIPE (Illegal seek) +101575 <... mmap resumed>) = 0x7f7e0ce66000 +101576 <... arch_prctl resumed>) = 0 +101577 read(0, +101575 close(3) = 0 +101575 openat(AT_FDCWD, "/usr/lib/liblzma.so.5", O_RDONLY|O_CLOEXEC +101576 mprotect(0x7f1494d84000, 12288, PROT_READ +101575 <... openat resumed>) = 3 +101576 <... mprotect resumed>) = 0 +101575 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 0\0\0\0\0\0\0"..., 832) = 832 +101576 mprotect(0x7f1494bc1000, 4096, PROT_READ +101575 newfstatat(3, "", +101576 <... mprotect resumed>) = 0 +101575 <... newfstatat resumed>{st_mode=S_IFREG|0755, st_size=161624, ...}, AT_EMPTY_PATH) = 0 +101576 mprotect(0x7f1494e08000, 4096, PROT_READ +101575 mmap(NULL, 163856, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0 +101576 <... mprotect resumed>) = 0 +101575 <... mmap resumed>) = 0x7f7e0ce34000 +101575 mprotect(0x7f7e0ce37000, 147456, PROT_NONE) = 0 +101576 mprotect(0x55ee4e71d000, 8192, PROT_READ +101575 mmap(0x7f7e0ce37000, 98304, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000 +101576 <... mprotect resumed>) = 0 +101575 <... mmap resumed>) = 0x7f7e0ce37000 +101576 mprotect(0x7f1494e51000, 8192, PROT_READ +101575 mmap(0x7f7e0ce4f000, 45056, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b000 +101576 <... mprotect resumed>) = 0 +101575 <... mmap resumed>) = 0x7f7e0ce4f000 +101576 munmap(0x7f1494e0c000, 92088 +101575 mmap(0x7f7e0ce5b000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f7e0ce5b000 +101576 <... munmap resumed>) = 0 +101576 set_tid_address(0x7f1494ba3a10 +101575 close(3 +101576 <... set_tid_address resumed>) = 101576 +101575 <... close resumed>) = 0 +101576 set_robust_list(0x7f1494ba3a20, 24 +101575 openat(AT_FDCWD, "/usr/lib/libzstd.so.1", O_RDONLY|O_CLOEXEC +101576 <... set_robust_list resumed>) = 0 +101575 <... openat resumed>) = 3 +101576 rt_sigaction(SIGRTMIN, {sa_handler=0x7f1494badb70, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7f1494bb9870}, +101575 read(3, +101576 <... rt_sigaction resumed>NULL, 8) = 0 +101575 <... read resumed>"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@P\0\0\0\0\0\0"..., 832) = 832 +101576 rt_sigaction(SIGRT_1, {sa_handler=0x7f1494badc10, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f1494bb9870}, +101575 newfstatat(3, "", +101576 <... rt_sigaction resumed>NULL, 8) = 0 +101575 <... newfstatat resumed>{st_mode=S_IFREG|0755, st_size=1103632, ...}, AT_EMPTY_PATH) = 0 +101576 rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], +101575 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 +101576 <... rt_sigprocmask resumed>NULL, 8) = 0 +101575 <... mmap resumed>) = 0x7f7e0ce32000 +101576 prlimit64(0, RLIMIT_STACK, NULL, +101575 mmap(NULL, 1105976, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0 +101576 <... prlimit64 resumed>{rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 +101575 <... mmap resumed>) = 0x7f7e0cd23000 +101575 mprotect(0x7f7e0cd28000, 1081344, PROT_NONE) = 0 +101575 mmap(0x7f7e0cd28000, 999424, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5000 +101576 brk(NULL +101575 <... mmap resumed>) = 0x7f7e0cd28000 +101576 <... brk resumed>) = 0x55ee4fc20000 +101575 mmap(0x7f7e0ce1c000, 77824, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf9000 +101576 brk(0x55ee4fc41000 +101575 <... mmap resumed>) = 0x7f7e0ce1c000 +101576 <... brk resumed>) = 0x55ee4fc41000 +101575 mmap(0x7f7e0ce30000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10c000 +101576 openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC +101575 <... mmap resumed>) = 0x7f7e0ce30000 +101576 <... openat resumed>) = 3 +101576 newfstatat(3, "", +101575 close(3 +101576 <... newfstatat resumed>{st_mode=S_IFREG|0644, st_size=3362224, ...}, AT_EMPTY_PATH) = 0 +101575 <... close resumed>) = 0 +101576 mmap(NULL, 3362224, PROT_READ, MAP_PRIVATE, 3, 0 +101575 openat(AT_FDCWD, "/usr/lib/liblz4.so.1", O_RDONLY|O_CLOEXEC +101576 <... mmap resumed>) = 0x7f149486e000 +101575 <... openat resumed>) = 3 +101576 close(3 +101575 read(3, +101576 <... close resumed>) = 0 +101575 <... read resumed>"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 0\0\0\0\0\0\0"..., 832) = 832 +101575 newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=136968, ...}, AT_EMPTY_PATH) = 0 +101576 openat(AT_FDCWD, "/usr/lib/gconv/gconv-modules.cache", O_RDONLY +101575 mmap(NULL, 139280, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0 +101576 <... openat resumed>) = -1 ENOENT (No such file or directory) +101575 <... mmap resumed>) = 0x7f7e0cd00000 +101576 openat(AT_FDCWD, "/usr/lib/gconv/gconv-modules", O_RDONLY|O_CLOEXEC +101575 mmap(0x7f7e0cd03000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000 +101576 <... openat resumed>) = 3 +101575 <... mmap resumed>) = 0x7f7e0cd03000 +101576 newfstatat(3, "", +101575 mmap(0x7f7e0cd1e000, 12288, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000 +101576 <... newfstatat resumed>{st_mode=S_IFREG|0644, st_size=56353, ...}, AT_EMPTY_PATH) = 0 +101575 <... mmap resumed>) = 0x7f7e0cd1e000 +101576 read(3, +101575 mmap(0x7f7e0cd21000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x20000 +101576 <... read resumed>"# GNU libc iconv configuration.\n"..., 4096) = 4096 +101575 <... mmap resumed>) = 0x7f7e0cd21000 +101575 close(3) = 0 +101576 read(3, +101575 openat(AT_FDCWD, "/usr/lib/libcap.so.2", O_RDONLY|O_CLOEXEC +101576 <... read resumed>"B1002//\tJUS_I.B1.002//\nmodule\tJU"..., 4096) = 4096 +101575 <... openat resumed>) = 3 +101575 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0i\0\0\0\0\0\0"..., 832) = 832 +101575 pread64(3, "\4\0\0\0 \0\0\0\5\0\0\0GNU\0\1\0\1\300\4\0\0\0\t\0\0\0\0\0\0\0"..., 48, 792) = 48 +101576 read(3, +101575 pread64(3, +101576 <... read resumed>"\tISO-IR-110//\t\tISO-8859-4//\nalia"..., 4096) = 4096 +101575 <... pread64 resumed>"\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\301gO\220\202\376\335AXv\271\367\331q\"i"..., 36, 840) = 36 +101575 newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=38776, ...}, AT_EMPTY_PATH) = 0 +101576 read(3, +101575 mmap(NULL, 41024, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0 +101576 <... read resumed>"\t\t\tISO-8859-14//\nalias\tISO_8859-"..., 4096) = 4096 +101575 <... mmap resumed>) = 0x7f7e0ccf5000 +101575 mmap(0x7f7e0ccf8000, 16384, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f7e0ccf8000 +101575 mmap(0x7f7e0ccfc000, 8192, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000 +101576 read(3, +101575 <... mmap resumed>) = 0x7f7e0ccfc000 +101576 <... read resumed>"DIC-ES//\nalias\tEBCDICES//\t\tEBCDI"..., 4096) = 4096 +101575 mmap(0x7f7e0ccfe000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0x7f7e0ccfe000 +101575 close(3) = 0 +101575 openat(AT_FDCWD, "/usr/lib/libgcrypt.so.20", O_RDONLY|O_CLOEXEC +101576 read(3, +101575 <... openat resumed>) = 3 +101576 <... read resumed>"CDIC-CP-ES//\t\tIBM284//\nalias\tCSI"..., 4096) = 4096 +101575 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\360\0\0\0\0\0\0"..., 832) = 832 +101575 newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1288016, ...}, AT_EMPTY_PATH) = 0 +101575 mmap(NULL, 1291608, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7e0cbb9000 +101576 read(3, +101575 mprotect(0x7f7e0cbc8000, 1191936, PROT_NONE +101576 <... read resumed>"\t\tIBM863//\nalias\tOSF1002035F//\t\t"..., 4096) = 4096 +101575 <... mprotect resumed>) = 0 +101575 mmap(0x7f7e0cbc8000, 921600, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf000) = 0x7f7e0cbc8000 +101575 mmap(0x7f7e0cca9000, 266240, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf0000) = 0x7f7e0cca9000 +101575 mmap(0x7f7e0cceb000, 40960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x131000) = 0x7f7e0cceb000 +101576 read(3, "937//\t\tIBM937//\nmodule\tIBM937//\t"..., 4096) = 4096 +101575 close(3) = 0 +101575 openat(AT_FDCWD, "/usr/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3 +101575 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\200\0\0\0\0\0\0"..., 832) = 832 +101575 pread64(3, "\4\0\0\0@\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0"..., 80, 792) = 80 +101576 read(3, +101575 pread64(3, +101576 <... read resumed>"UJIS//\t\t\tEUC-JP//\nmodule\tEUC-JP/"..., 4096) = 4096 +101575 <... pread64 resumed>"\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\7\310\371[O2Q\320\205P!z\330\241\363\20"..., 68, 872) = 68 +101575 newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=154040, ...}, AT_EMPTY_PATH) = 0 +101575 mmap(NULL, 131472, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7e0cb98000 +101575 mprotect(0x7f7e0cb9f000, 81920, PROT_NONE) = 0 +101576 read(3, +101575 mmap(0x7f7e0cb9f000, 61440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000 +101576 <... read resumed>"lias\tISO2022CN//\t\tISO-2022-CN//\n"..., 4096) = 4096 +101575 <... mmap resumed>) = 0x7f7e0cb9f000 +101575 mmap(0x7f7e0cbae000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7f7e0cbae000 +101575 mmap(0x7f7e0cbb3000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a000) = 0x7f7e0cbb3000 +101575 mmap(0x7f7e0cbb5000, 12688, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f7e0cbb5000 +101576 read(3, +101575 close(3 +101576 <... read resumed>"O_5427-EXT//\nalias\tISO_5427EXT//"..., 4096) = 4096 +101575 <... close resumed>) = 0 +101575 openat(AT_FDCWD, "/usr/lib/libgpg-error.so.0", O_RDONLY|O_CLOEXEC) = 3 +101575 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@P\0\0\0\0\0\0"..., 832) = 832 +101575 newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=153648, ...}, AT_EMPTY_PATH) = 0 +101575 mmap(NULL, 156112, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0 +101576 read(3, +101575 <... mmap resumed>) = 0x7f7e0cb71000 +101576 <... read resumed>"ost\nmodule\tMAC-SAMI//\t\tINTERNAL\t"..., 4096) = 4096 +101575 mprotect(0x7f7e0cb76000, 131072, PROT_NONE) = 0 +101575 mmap(0x7f7e0cb76000, 86016, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5000) = 0x7f7e0cb76000 +101575 mmap(0x7f7e0cb8b000, 40960, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a000) = 0x7f7e0cb8b000 +101575 mmap(0x7f7e0cb96000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x24000) = 0x7f7e0cb96000 +101575 close(3 +101576 read(3, +101575 <... close resumed>) = 0 +101576 <... read resumed>"112//\t\tINTERNAL\t\tIBM1112\t\t1\nmodu"..., 4096) = 4096 +101575 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7e0cb6f000 +101575 mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7e0cb6c000 +101576 brk(0x55ee4fc62000 +101575 arch_prctl(ARCH_SET_FS, 0x7f7e0cb6c7c0 +101576 <... brk resumed>) = 0x55ee4fc62000 +101575 <... arch_prctl resumed>) = 0 +101575 mprotect(0x7f7e0d0f1000, 12288, PROT_READ) = 0 +101576 read(3, "s\tCP9448//\t\tIBM9448//\nalias\tCSIB"..., 4096) = 3105 +101575 mprotect(0x7f7e0cb96000, 4096, PROT_READ) = 0 +101575 mprotect(0x7f7e0cbb3000, 4096, PROT_READ) = 0 +101576 read(3, "", 4096) = 0 +101575 mprotect(0x7f7e0cceb000, 12288, PROT_READ +101576 close(3 +101575 <... mprotect resumed>) = 0 +101576 <... close resumed>) = 0 +101575 mprotect(0x7f7e0ccfe000, 4096, PROT_READ) = 0 +101575 mprotect(0x7f7e0cd21000, 4096, PROT_READ +101576 futex(0x7f1494d894dc, FUTEX_WAKE_PRIVATE, 2147483647 +101575 <... mprotect resumed>) = 0 +101576 <... futex resumed>) = 0 +101575 mprotect(0x7f7e0ce30000, 4096, PROT_READ) = 0 +101575 mprotect(0x7f7e0ce5b000, 4096, PROT_READ) = 0 +101575 mprotect(0x7f7e0ce66000, 4096, PROT_READ) = 0 +101575 mprotect(0x7f7e0ce6d000, 4096, PROT_READ) = 0 +101575 mprotect(0x7f7e0cf2b000, 28672, PROT_READ) = 0 +101575 mprotect(0x7f7e0d113000, 8192, PROT_READ) = 0 +101576 openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3 +101575 mprotect(0x55ec672e2000, 20480, PROT_READ +101576 newfstatat(3, "", +101575 <... mprotect resumed>) = 0 +101576 <... newfstatat resumed>{st_mode=S_IFREG|0644, st_size=2998, ...}, AT_EMPTY_PATH) = 0 +101575 mprotect(0x7f7e0d180000, 8192, PROT_READ +101576 read(3, +101575 <... mprotect resumed>) = 0 +101576 <... read resumed>"# Locale name alias data base.\n#"..., 4096) = 2998 +101575 munmap(0x7f7e0d13b000, 92088 +101576 read(3, "", 4096) = 0 +101575 <... munmap resumed>) = 0 +101576 close(3 +101575 set_tid_address(0x7f7e0cb6ca90 +101576 <... close resumed>) = 0 +101575 <... set_tid_address resumed>) = 101575 +101575 set_robust_list(0x7f7e0cb6caa0, 24 +101576 openat(AT_FDCWD, "/usr/share/locale/en_US.UTF-8/LC_MESSAGES/grep.mo", O_RDONLY +101575 <... set_robust_list resumed>) = 0 +101576 <... openat resumed>) = -1 ENOENT (No such file or directory) +101575 rt_sigaction(SIGRTMIN, {sa_handler=0x7f7e0cb9fb70, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7f7e0cbab870}, +101576 openat(AT_FDCWD, "/usr/share/locale/en_US.utf8/LC_MESSAGES/grep.mo", O_RDONLY +101575 <... rt_sigaction resumed>NULL, 8) = 0 +101576 <... openat resumed>) = -1 ENOENT (No such file or directory) +101575 rt_sigaction(SIGRT_1, {sa_handler=0x7f7e0cb9fc10, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f7e0cbab870}, +101576 openat(AT_FDCWD, "/usr/share/locale/en_US/LC_MESSAGES/grep.mo", O_RDONLY +101575 <... rt_sigaction resumed>NULL, 8) = 0 +101576 <... openat resumed>) = -1 ENOENT (No such file or directory) +101575 rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], +101576 openat(AT_FDCWD, "/usr/share/locale/en.UTF-8/LC_MESSAGES/grep.mo", O_RDONLY +101575 <... rt_sigprocmask resumed>NULL, 8) = 0 +101576 <... openat resumed>) = -1 ENOENT (No such file or directory) +101575 prlimit64(0, RLIMIT_STACK, NULL, +101576 openat(AT_FDCWD, "/usr/share/locale/en.utf8/LC_MESSAGES/grep.mo", O_RDONLY +101575 <... prlimit64 resumed>{rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 +101576 <... openat resumed>) = -1 ENOENT (No such file or directory) +101576 openat(AT_FDCWD, "/usr/share/locale/en/LC_MESSAGES/grep.mo", O_RDONLY +101575 brk(NULL +101576 <... openat resumed>) = -1 ENOENT (No such file or directory) +101575 <... brk resumed>) = 0x55ec68e38000 +101576 openat(AT_FDCWD, "/proc/self/maps", O_RDONLY +101575 brk(0x55ec68e59000) = 0x55ec68e59000 +101576 <... openat resumed>) = 3 +101576 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 +101575 prctl(PR_CAPBSET_READ, CAP_MAC_OVERRIDE +101576 <... mmap resumed>) = 0x7f1494e21000 +101575 <... prctl resumed>) = 1 +101576 lseek(3, 0, SEEK_SET +101575 prctl(PR_CAPBSET_READ, 0x30 /* CAP_??? */ +101576 <... lseek resumed>) = 0 +101575 <... prctl resumed>) = -1 EINVAL (Invalid argument) +101576 read(3, +101575 prctl(PR_CAPBSET_READ, CAP_CHECKPOINT_RESTORE) = 1 +101576 <... read resumed>"55ee4e6e5000-55ee4e6e9000 r--p 0"..., 8192) = 3284 +101575 prctl(PR_CAPBSET_READ, 0x2c /* CAP_??? */ +101576 read(3, +101575 <... prctl resumed>) = -1 EINVAL (Invalid argument) +101576 <... read resumed>"", 4908) = 0 +101575 prctl(PR_CAPBSET_READ, 0x2a /* CAP_??? */ +101576 close(3 +101575 <... prctl resumed>) = -1 EINVAL (Invalid argument) +101576 <... close resumed>) = 0 +101575 prctl(PR_CAPBSET_READ, 0x29 /* CAP_??? */ +101576 munmap(0x7f1494e21000, 8192 +101575 <... prctl resumed>) = -1 EINVAL (Invalid argument) +101576 <... munmap resumed>) = 0 +101576 sigaltstack({ss_sp=0x55ee4e71fb00, ss_flags=0, ss_size=65536}, NULL) = 0 +101575 openat(AT_FDCWD, "/proc/self/auxv", O_RDONLY +101576 rt_sigaction(SIGSEGV, {sa_handler=0x55ee4e6fed60, sa_mask=[HUP INT QUIT USR1 USR2 PIPE ALRM TERM CHLD URG XCPU XFSZ VTALRM PROF WINCH IO PWR], sa_flags=SA_RESTORER|SA_ONSTACK|SA_SIGINFO, sa_restorer=0x7f1494c03da0}, +101575 <... openat resumed>) = 3 +101576 <... rt_sigaction resumed>NULL, 8) = 0 +101575 newfstatat(3, "", +101576 rt_sigaction(SIGSEGV, {sa_handler=0x55ee4e6fed60, sa_mask=[HUP INT QUIT USR1 USR2 PIPE ALRM TERM CHLD URG XCPU XFSZ VTALRM PROF WINCH IO PWR], sa_flags=SA_RESTORER|SA_ONSTACK|SA_SIGINFO, sa_restorer=0x7f1494c03da0}, +101575 <... newfstatat resumed>{st_mode=S_IFREG|0400, st_size=0, ...}, AT_EMPTY_PATH) = 0 +101576 <... rt_sigaction resumed>NULL, 8) = 0 +101575 read(3, +101576 newfstatat(1, "", +101575 <... read resumed>"!\0\0\0\0\0\0\0\0@\31\236\375\177\0\0003\0\0\0\0\0\0\0\360\7\0\0\0\0\0\0"..., 1024) = 336 +101576 <... newfstatat resumed>{st_mode=S_IFIFO|0600, st_size=0, ...}, AT_EMPTY_PATH) = 0 +101575 close(3) = 0 +101575 openat(AT_FDCWD, "/proc/sys/kernel/osrelease", O_RDONLY +101576 brk(0x55ee4fc83000 +101575 <... openat resumed>) = 3 +101576 <... brk resumed>) = 0x55ee4fc83000 +101575 newfstatat(3, "", +101576 newfstatat(0, "", +101575 <... newfstatat resumed>{st_mode=S_IFREG|0444, st_size=0, ...}, AT_EMPTY_PATH) = 0 +101576 <... newfstatat resumed>{st_mode=S_IFIFO|0600, st_size=0, ...}, AT_EMPTY_PATH) = 0 +101575 read(3, +101576 lseek(0, 0, SEEK_CUR +101575 <... read resumed>"5.14.15-arch1-1\n", 1024) = 16 +101576 <... lseek resumed>) = -1 ESPIPE (Illegal seek) +101575 close(3 +101576 read(0, +101575 <... close resumed>) = 0 +101575 openat(AT_FDCWD, "/sys/devices/system/cpu/online", O_RDONLY|O_CLOEXEC) = 3 +101575 read(3, "0-7\n", 8192) = 4 +101575 close(3) = 0 +101575 openat(AT_FDCWD, "/proc/self/auxv", O_RDONLY) = 3 +101575 newfstatat(3, "", {st_mode=S_IFREG|0400, st_size=0, ...}, AT_EMPTY_PATH) = 0 +101575 read(3, "!\0\0\0\0\0\0\0\0@\31\236\375\177\0\0003\0\0\0\0\0\0\0\360\7\0\0\0\0\0\0"..., 1024) = 336 +101575 close(3) = 0 +101575 openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3 +101575 newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=3362224, ...}, AT_EMPTY_PATH) = 0 +101575 mmap(NULL, 3362224, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f7e0c837000 +101575 close(3) = 0 +101575 rt_sigaction(SIGSYS, {sa_handler=0x55ec672cfc00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f7e0cf70da0}, NULL, 8) = 0 +101575 rt_sigaction(SIGPWR, {sa_handler=0x55ec672cfc00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f7e0cf70da0}, NULL, 8) = 0 +101575 rt_sigaction(SIGIO, {sa_handler=0x55ec672cfc00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f7e0cf70da0}, NULL, 8) = 0 +101575 rt_sigaction(SIGVTALRM, {sa_handler=0x55ec672cfc00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f7e0cf70da0}, NULL, 8) = 0 +101575 rt_sigaction(SIGXFSZ, {sa_handler=0x55ec672cfc00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f7e0cf70da0}, NULL, 8) = 0 +101575 rt_sigaction(SIGXCPU, {sa_handler=0x55ec672cfc00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f7e0cf70da0}, NULL, 8) = 0 +101575 rt_sigaction(SIGURG, {sa_handler=0x55ec672cfc00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f7e0cf70da0}, NULL, 8) = 0 +101575 rt_sigaction(SIGTTIN, {sa_handler=0x55ec672cfc00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f7e0cf70da0}, NULL, 8) = 0 +101575 rt_sigaction(SIGCHLD, {sa_handler=0x55ec672cfc00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f7e0cf70da0}, NULL, 8) = 0 +101575 rt_sigaction(SIGSTKFLT, {sa_handler=0x55ec672cfc00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f7e0cf70da0}, NULL, 8) = 0 +101575 rt_sigaction(SIGTERM, {sa_handler=0x55ec672cfc00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f7e0cf70da0}, NULL, 8) = 0 +101575 rt_sigaction(SIGALRM, {sa_handler=0x55ec672cfc00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f7e0cf70da0}, NULL, 8) = 0 +101575 rt_sigaction(SIGPIPE, {sa_handler=0x55ec672cfc00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f7e0cf70da0}, NULL, 8) = 0 +101575 rt_sigaction(SIGUSR2, {sa_handler=0x55ec672cfc00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f7e0cf70da0}, NULL, 8) = 0 +101575 rt_sigaction(SIGSEGV, {sa_handler=0x55ec672cfc00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f7e0cf70da0}, NULL, 8) = 0 +101575 rt_sigaction(SIGUSR1, {sa_handler=0x55ec672cfc00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f7e0cf70da0}, NULL, 8) = 0 +101575 rt_sigaction(SIGFPE, {sa_handler=0x55ec672cfc00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f7e0cf70da0}, NULL, 8) = 0 +101575 rt_sigaction(SIGBUS, {sa_handler=0x55ec672cfc00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f7e0cf70da0}, NULL, 8) = 0 +101575 rt_sigaction(SIGABRT, {sa_handler=0x55ec672cfc00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f7e0cf70da0}, NULL, 8) = 0 +101575 rt_sigaction(SIGTRAP, {sa_handler=0x55ec672cfc00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f7e0cf70da0}, NULL, 8) = 0 +101575 rt_sigaction(SIGILL, {sa_handler=0x55ec672cfc00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f7e0cf70da0}, NULL, 8) = 0 +101575 rt_sigaction(SIGHUP, {sa_handler=0x55ec672cfc00, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f7e0cf70da0}, NULL, 8) = 0 +101575 openat(AT_FDCWD, "/proc/self/stat", O_RDONLY) = 3 +101575 read(3, "101575 (ps) R DASH 101575 6439"..., 1024) = 323 +101575 close(3) = 0 +101575 ioctl(1, TIOCGWINSZ, 0x7ffd9e0686f0) = -1 ENOTTY (Inappropriate ioctl for device) +101575 ioctl(2, TIOCGWINSZ, {ws_row=32, ws_col=119, ws_xpixel=1071, ws_ypixel=608}) = 0 +101575 ioctl(1, TCGETS, 0x7ffd9e068640) = -1 ENOTTY (Inappropriate ioctl for device) +101575 geteuid() = 1000 +101575 openat(AT_FDCWD, "/proc/uptime", O_RDONLY) = 3 +101575 lseek(3, 0, SEEK_SET) = 0 +101575 read(3, "19689.86 141792.13\n", 8191) = 19 +101575 openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 4 +101575 newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=2998, ...}, AT_EMPTY_PATH) = 0 +101575 read(4, "# Locale name alias data base.\n#"..., 4096) = 2998 +101575 read(4, "", 4096) = 0 +101575 close(4) = 0 +101575 openat(AT_FDCWD, "/usr/share/locale/en_US.UTF-8/LC_MESSAGES/procps-ng.mo", O_RDONLY) = -1 ENOENT (No such file or directory) +101575 openat(AT_FDCWD, "/usr/share/locale/en_US.utf8/LC_MESSAGES/procps-ng.mo", O_RDONLY) = -1 ENOENT (No such file or directory) +101575 openat(AT_FDCWD, "/usr/share/locale/en_US/LC_MESSAGES/procps-ng.mo", O_RDONLY) = -1 ENOENT (No such file or directory) +101575 openat(AT_FDCWD, "/usr/share/locale/en.UTF-8/LC_MESSAGES/procps-ng.mo", O_RDONLY) = -1 ENOENT (No such file or directory) +101575 openat(AT_FDCWD, "/usr/share/locale/en.utf8/LC_MESSAGES/procps-ng.mo", O_RDONLY) = -1 ENOENT (No such file or directory) +101575 openat(AT_FDCWD, "/usr/share/locale/en/LC_MESSAGES/procps-ng.mo", O_RDONLY) = -1 ENOENT (No such file or directory) +101575 openat(AT_FDCWD, "/proc/sys/kernel/pid_max", O_RDONLY) = 4 +101575 read(4, "4194304\n", 23) = 8 +101575 close(4) = 0 +101575 mmap(NULL, 139264, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7e0c815000 +101575 mprotect(0x7f7e0c836000, 4096, PROT_NONE) = 0 +101575 openat(AT_FDCWD, "/proc/sys/kernel/osrelease", O_RDONLY) = 4 +101575 newfstatat(4, "", {st_mode=S_IFREG|0444, st_size=0, ...}, AT_EMPTY_PATH) = 0 +101575 read(4, "5.14.15-arch1-1\n", 1024) = 16 +101575 close(4) = 0 +101575 openat(AT_FDCWD, "/proc/meminfo", O_RDONLY) = 4 +101575 lseek(4, 0, SEEK_SET) = 0 +101575 read(4, "MemTotal: 16144640 kB\nMemF"..., 8191) = 1475 +101575 newfstatat(AT_FDCWD, "/proc/self/task", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 5 +101575 newfstatat(5, "", {st_mode=S_IFDIR|0555, st_size=0, ...}, AT_EMPTY_PATH) = 0 +101575 mmap(NULL, 135168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7e0c7f4000 +101575 mmap(NULL, 135168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7e0c7d3000 +101575 getdents64(5, 0x55ec68e3c0c0 /* 289 entries */, 32768) = 7760 +101575 newfstatat(AT_FDCWD, "/proc/1", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/1/stat", O_RDONLY) = 6 +101575 read(6, "1 (systemd) S 0 1 1 0 -1 4194560"..., 1024) = 195 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1/status", O_RDONLY) = 6 +101575 read(6, "Name:\tsystemd\nUmask:\t0000\nState:"..., 1024) = 1024 +101575 read(6, "luntary_ctxt_switches:\t3690\nnonv"..., 1024) = 60 +101575 close(6) = 0 +101575 socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 6 +101575 connect(6, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) +101575 close(6) = 0 +101575 socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 6 +101575 connect(6, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory) +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/etc/nsswitch.conf", {st_mode=S_IFREG|0644, st_size=328, ...}, 0) = 0 +101575 newfstatat(AT_FDCWD, "/", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 6 +101575 newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=328, ...}, AT_EMPTY_PATH) = 0 +101575 read(6, "# Name Service Switch configurat"..., 4096) = 328 +101575 read(6, "", 4096) = 0 +101575 newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=328, ...}, AT_EMPTY_PATH) = 0 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 6 +101575 newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=92088, ...}, AT_EMPTY_PATH) = 0 +101575 mmap(NULL, 92088, PROT_READ, MAP_PRIVATE, 6, 0) = 0x7f7e0d13b000 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/usr/lib/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 6 +101575 read(6, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P5\0\0\0\0\0\0"..., 832) = 832 +101575 newfstatat(6, "", {st_mode=S_IFREG|0755, st_size=51376, ...}, AT_EMPTY_PATH) = 0 +101575 mmap(NULL, 79320, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 6, 0) = 0x7f7e0c7bf000 +101575 mmap(0x7f7e0c7c2000, 28672, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 6, 0x3000) = 0x7f7e0c7c2000 +101575 mmap(0x7f7e0c7c9000, 8192, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 6, 0xa000) = 0x7f7e0c7c9000 +101575 mmap(0x7f7e0c7cb000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 6, 0xb000) = 0x7f7e0c7cb000 +101575 mmap(0x7f7e0c7cd000, 21976, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f7e0c7cd000 +101575 close(6) = 0 +101575 mprotect(0x7f7e0c7cb000, 4096, PROT_READ) = 0 +101575 munmap(0x7f7e0d13b000, 92088) = 0 +101575 openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 6 +101575 newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=1257, ...}, AT_EMPTY_PATH) = 0 +101575 lseek(6, 0, SEEK_SET) = 0 +101575 read(6, "root:x:0:0::/root:/bin/bash\nbin:"..., 4096) = 1257 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1/cmdline", O_RDONLY) = 6 +101575 read(6, "/sbin/init\0", 131072) = 11 +101575 read(6, "", 131061) = 0 +101575 close(6) = 0 +101575 newfstatat(1, "", {st_mode=S_IFIFO|0600, st_size=0, ...}, AT_EMPTY_PATH) = 0 +101575 openat(AT_FDCWD, "/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = -1 ENOENT (No such file or directory) +101575 openat(AT_FDCWD, "/usr/lib/gconv/gconv-modules", O_RDONLY|O_CLOEXEC) = 6 +101575 newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=56353, ...}, AT_EMPTY_PATH) = 0 +101575 read(6, "# GNU libc iconv configuration.\n"..., 4096) = 4096 +101575 read(6, "B1002//\tJUS_I.B1.002//\nmodule\tJU"..., 4096) = 4096 +101575 read(6, "\tISO-IR-110//\t\tISO-8859-4//\nalia"..., 4096) = 4096 +101575 read(6, "\t\t\tISO-8859-14//\nalias\tISO_8859-"..., 4096) = 4096 +101575 read(6, "DIC-ES//\nalias\tEBCDICES//\t\tEBCDI"..., 4096) = 4096 +101575 read(6, "CDIC-CP-ES//\t\tIBM284//\nalias\tCSI"..., 4096) = 4096 +101575 read(6, "\t\tIBM863//\nalias\tOSF1002035F//\t\t"..., 4096) = 4096 +101575 read(6, "937//\t\tIBM937//\nmodule\tIBM937//\t"..., 4096) = 4096 +101575 brk(0x55ec68e7a000) = 0x55ec68e7a000 +101575 read(6, "UJIS//\t\t\tEUC-JP//\nmodule\tEUC-JP/"..., 4096) = 4096 +101575 read(6, "lias\tISO2022CN//\t\tISO-2022-CN//\n"..., 4096) = 4096 +101575 read(6, "O_5427-EXT//\nalias\tISO_5427EXT//"..., 4096) = 4096 +101575 read(6, "ost\nmodule\tMAC-SAMI//\t\tINTERNAL\t"..., 4096) = 4096 +101575 read(6, "112//\t\tINTERNAL\t\tIBM1112\t\t1\nmodu"..., 4096) = 4096 +101575 read(6, "s\tCP9448//\t\tIBM9448//\nalias\tCSIB"..., 4096) = 3105 +101575 read(6, "", 4096) = 0 +101575 close(6) = 0 +101575 futex(0x7f7e0d0f64dc, FUTEX_WAKE_PRIVATE, 2147483647) = 0 +101575 openat(AT_FDCWD, "/etc/localtime", O_RDONLY|O_CLOEXEC) = 6 +101575 newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=2654, ...}, AT_EMPTY_PATH) = 0 +101575 newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=2654, ...}, AT_EMPTY_PATH) = 0 +101575 read(6, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\v\0\0\0\v\0\0\0\0"..., 4096) = 2654 +101575 lseek(6, -1671, SEEK_CUR) = 983 +101575 read(6, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\v\0\0\0\v\0\0\0\0"..., 4096) = 1671 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/stat", O_RDONLY) = 6 +101575 newfstatat(6, "", {st_mode=S_IFREG|0444, st_size=0, ...}, AT_EMPTY_PATH) = 0 +101575 read(6, "cpu 1110594 61 419891 14076336 "..., 1024) = 1024 +101575 read(6, "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 "..., 1024) = 1024 +101575 read(6, "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 "..., 1024) = 1024 +101575 read(6, "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 "..., 1024) = 1024 +101575 read(6, "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 "..., 1024) = 678 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/2", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/2/stat", O_RDONLY) = 6 +101575 read(6, "2 (kthreadd) S 0 0 0 0 -1 212998"..., 2048) = 150 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/2/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkthreadd\nUmask:\t0000\nState"..., 2048) = 729 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/2/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/3", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/3/stat", O_RDONLY) = 6 +101575 read(6, "3 (rcu_gp) I 2 0 0 0 -1 69238880"..., 2048) = 151 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/3/status", O_RDONLY) = 6 +101575 read(6, "Name:\trcu_gp\nUmask:\t0000\nState:\t"..., 2048) = 721 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/3/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/4", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/4/stat", O_RDONLY) = 6 +101575 read(6, "4 (rcu_par_gp) I 2 0 0 0 -1 6923"..., 2048) = 155 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/4/status", O_RDONLY) = 6 +101575 read(6, "Name:\trcu_par_gp\nUmask:\t0000\nSta"..., 2048) = 725 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/4/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/6", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/6/stat", O_RDONLY) = 6 +101575 read(6, "6 (kworker/0:0H-events_highpri) "..., 2048) = 172 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/6/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/0:0H-events_highpr"..., 2048) = 740 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/6/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/8", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/8/stat", O_RDONLY) = 6 +101575 read(6, "8 (mm_percpu_wq) I 2 0 0 0 -1 69"..., 2048) = 157 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/8/status", O_RDONLY) = 6 +101575 read(6, "Name:\tmm_percpu_wq\nUmask:\t0000\nS"..., 2048) = 727 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/8/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/10", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/10/stat", O_RDONLY) = 6 +101575 read(6, "10 (rcu_tasks_kthre) S 2 0 0 0 -"..., 2048) = 159 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/10/status", O_RDONLY) = 6 +101575 read(6, "Name:\trcu_tasks_kthre\nUmask:\t000"..., 2048) = 738 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/10/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/11", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/11/stat", O_RDONLY) = 6 +101575 read(6, "11 (rcu_tasks_rude_) S 2 0 0 0 -"..., 2048) = 159 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/11/status", O_RDONLY) = 6 +101575 read(6, "Name:\trcu_tasks_rude_\nUmask:\t000"..., 2048) = 738 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/11/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/12", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/12/stat", O_RDONLY) = 6 +101575 read(6, "12 (rcu_tasks_trace) S 2 0 0 0 -"..., 2048) = 159 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/12/status", O_RDONLY) = 6 +101575 read(6, "Name:\trcu_tasks_trace\nUmask:\t000"..., 2048) = 738 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/12/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/13", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/13/stat", O_RDONLY) = 6 +101575 read(6, "13 (ksoftirqd/0) S 2 0 0 0 -1 69"..., 2048) = 158 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/13/status", O_RDONLY) = 6 +101575 read(6, "Name:\tksoftirqd/0\nUmask:\t0000\nSt"..., 2048) = 738 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/13/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/14", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/14/stat", O_RDONLY) = 6 +101575 read(6, "14 (rcu_preempt) I 2 0 0 0 -1 21"..., 2048) = 157 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/14/status", O_RDONLY) = 6 +101575 read(6, "Name:\trcu_preempt\nUmask:\t0000\nSt"..., 2048) = 737 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/14/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/15", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/15/stat", O_RDONLY) = 6 +101575 read(6, "15 (rcub/0) S 2 0 0 0 -1 2129984"..., 2048) = 150 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/15/status", O_RDONLY) = 6 +101575 read(6, "Name:\trcub/0\nUmask:\t0000\nState:\t"..., 2048) = 729 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/15/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/16", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/16/stat", O_RDONLY) = 6 +101575 read(6, "16 (rcuc/0) S 2 0 0 0 -1 6923884"..., 2048) = 151 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/16/status", O_RDONLY) = 6 +101575 read(6, "Name:\trcuc/0\nUmask:\t0000\nState:\t"..., 2048) = 727 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/16/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/17", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/17/stat", O_RDONLY) = 6 +101575 read(6, "17 (migration/0) S 2 0 0 0 -1 69"..., 2048) = 159 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/17/status", O_RDONLY) = 6 +101575 read(6, "Name:\tmigration/0\nUmask:\t0000\nSt"..., 2048) = 735 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/17/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/18", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/18/stat", O_RDONLY) = 6 +101575 read(6, "18 (idle_inject/0) S 2 0 0 0 -1 "..., 2048) = 160 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/18/status", O_RDONLY) = 6 +101575 read(6, "Name:\tidle_inject/0\nUmask:\t0000\n"..., 2048) = 734 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/18/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/20", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/20/stat", O_RDONLY) = 6 +101575 read(6, "20 (cpuhp/0) S 2 0 0 0 -1 692388"..., 2048) = 152 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/20/status", O_RDONLY) = 6 +101575 read(6, "Name:\tcpuhp/0\nUmask:\t0000\nState:"..., 2048) = 729 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/20/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/21", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/21/stat", O_RDONLY) = 6 +101575 read(6, "21 (cpuhp/1) S 2 0 0 0 -1 692391"..., 2048) = 152 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/21/status", O_RDONLY) = 6 +101575 read(6, "Name:\tcpuhp/1\nUmask:\t0000\nState:"..., 2048) = 729 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/21/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/22", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/22/stat", O_RDONLY) = 6 +101575 read(6, "22 (idle_inject/1) S 2 0 0 0 -1 "..., 2048) = 160 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/22/status", O_RDONLY) = 6 +101575 read(6, "Name:\tidle_inject/1\nUmask:\t0000\n"..., 2048) = 734 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/22/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/23", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/23/stat", O_RDONLY) = 6 +101575 read(6, "23 (migration/1) S 2 0 0 0 -1 69"..., 2048) = 160 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/23/status", O_RDONLY) = 6 +101575 read(6, "Name:\tmigration/1\nUmask:\t0000\nSt"..., 2048) = 735 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/23/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/24", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/24/stat", O_RDONLY) = 6 +101575 read(6, "24 (rcuc/1) S 2 0 0 0 -1 6923884"..., 2048) = 151 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/24/status", O_RDONLY) = 6 +101575 read(6, "Name:\trcuc/1\nUmask:\t0000\nState:\t"..., 2048) = 727 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/24/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/25", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/25/stat", O_RDONLY) = 6 +101575 read(6, "25 (ksoftirqd/1) S 2 0 0 0 -1 69"..., 2048) = 158 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/25/status", O_RDONLY) = 6 +101575 read(6, "Name:\tksoftirqd/1\nUmask:\t0000\nSt"..., 2048) = 737 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/25/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/27", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/27/stat", O_RDONLY) = 6 +101575 read(6, "27 (kworker/1:0H-events_highpri)"..., 2048) = 173 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/27/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/1:0H-events_highpr"..., 2048) = 744 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/27/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/28", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/28/stat", O_RDONLY) = 6 +101575 read(6, "28 (cpuhp/2) S 2 0 0 0 -1 692391"..., 2048) = 152 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/28/status", O_RDONLY) = 6 +101575 read(6, "Name:\tcpuhp/2\nUmask:\t0000\nState:"..., 2048) = 729 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/28/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/29", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/29/stat", O_RDONLY) = 6 +101575 read(6, "29 (idle_inject/2) S 2 0 0 0 -1 "..., 2048) = 160 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/29/status", O_RDONLY) = 6 +101575 read(6, "Name:\tidle_inject/2\nUmask:\t0000\n"..., 2048) = 734 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/29/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/30", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/30/stat", O_RDONLY) = 6 +101575 read(6, "30 (migration/2) S 2 0 0 0 -1 69"..., 2048) = 160 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/30/status", O_RDONLY) = 6 +101575 read(6, "Name:\tmigration/2\nUmask:\t0000\nSt"..., 2048) = 735 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/30/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/31", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/31/stat", O_RDONLY) = 6 +101575 read(6, "31 (rcuc/2) S 2 0 0 0 -1 6923884"..., 2048) = 151 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/31/status", O_RDONLY) = 6 +101575 read(6, "Name:\trcuc/2\nUmask:\t0000\nState:\t"..., 2048) = 727 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/31/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/32", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/32/stat", O_RDONLY) = 6 +101575 read(6, "32 (ksoftirqd/2) S 2 0 0 0 -1 69"..., 2048) = 158 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/32/status", O_RDONLY) = 6 +101575 read(6, "Name:\tksoftirqd/2\nUmask:\t0000\nSt"..., 2048) = 738 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/32/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/34", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/34/stat", O_RDONLY) = 6 +101575 read(6, "34 (kworker/2:0H-kblockd) I 2 0 "..., 2048) = 166 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/34/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/2:0H-kblockd\nUmask"..., 2048) = 737 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/34/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/35", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/35/stat", O_RDONLY) = 6 +101575 read(6, "35 (cpuhp/3) S 2 0 0 0 -1 692391"..., 2048) = 152 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/35/status", O_RDONLY) = 6 +101575 read(6, "Name:\tcpuhp/3\nUmask:\t0000\nState:"..., 2048) = 729 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/35/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/36", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/36/stat", O_RDONLY) = 6 +101575 read(6, "36 (idle_inject/3) S 2 0 0 0 -1 "..., 2048) = 160 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/36/status", O_RDONLY) = 6 +101575 read(6, "Name:\tidle_inject/3\nUmask:\t0000\n"..., 2048) = 734 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/36/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/37", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/37/stat", O_RDONLY) = 6 +101575 read(6, "37 (migration/3) S 2 0 0 0 -1 69"..., 2048) = 160 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/37/status", O_RDONLY) = 6 +101575 read(6, "Name:\tmigration/3\nUmask:\t0000\nSt"..., 2048) = 735 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/37/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/38", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/38/stat", O_RDONLY) = 6 +101575 read(6, "38 (rcuc/3) S 2 0 0 0 -1 6923884"..., 2048) = 151 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/38/status", O_RDONLY) = 6 +101575 read(6, "Name:\trcuc/3\nUmask:\t0000\nState:\t"..., 2048) = 727 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/38/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/39", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/39/stat", O_RDONLY) = 6 +101575 read(6, "39 (ksoftirqd/3) S 2 0 0 0 -1 69"..., 2048) = 158 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/39/status", O_RDONLY) = 6 +101575 read(6, "Name:\tksoftirqd/3\nUmask:\t0000\nSt"..., 2048) = 737 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/39/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/41", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/41/stat", O_RDONLY) = 6 +101575 read(6, "41 (kworker/3:0H-kblockd) I 2 0 "..., 2048) = 166 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/41/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/3:0H-kblockd\nUmask"..., 2048) = 737 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/41/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/42", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/42/stat", O_RDONLY) = 6 +101575 read(6, "42 (cpuhp/4) S 2 0 0 0 -1 692391"..., 2048) = 152 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/42/status", O_RDONLY) = 6 +101575 read(6, "Name:\tcpuhp/4\nUmask:\t0000\nState:"..., 2048) = 729 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/42/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/43", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/43/stat", O_RDONLY) = 6 +101575 read(6, "43 (idle_inject/4) S 2 0 0 0 -1 "..., 2048) = 160 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/43/status", O_RDONLY) = 6 +101575 read(6, "Name:\tidle_inject/4\nUmask:\t0000\n"..., 2048) = 734 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/43/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/44", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/44/stat", O_RDONLY) = 6 +101575 read(6, "44 (migration/4) S 2 0 0 0 -1 69"..., 2048) = 160 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/44/status", O_RDONLY) = 6 +101575 read(6, "Name:\tmigration/4\nUmask:\t0000\nSt"..., 2048) = 735 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/44/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/45", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/45/stat", O_RDONLY) = 6 +101575 read(6, "45 (rcuc/4) S 2 0 0 0 -1 6923884"..., 2048) = 151 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/45/status", O_RDONLY) = 6 +101575 read(6, "Name:\trcuc/4\nUmask:\t0000\nState:\t"..., 2048) = 727 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/45/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/46", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/46/stat", O_RDONLY) = 6 +101575 read(6, "46 (ksoftirqd/4) S 2 0 0 0 -1 69"..., 2048) = 158 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/46/status", O_RDONLY) = 6 +101575 read(6, "Name:\tksoftirqd/4\nUmask:\t0000\nSt"..., 2048) = 737 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/46/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/48", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/48/stat", O_RDONLY) = 6 +101575 read(6, "48 (kworker/4:0H-events_highpri)"..., 2048) = 173 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/48/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/4:0H-events_highpr"..., 2048) = 744 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/48/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/49", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/49/stat", O_RDONLY) = 6 +101575 read(6, "49 (cpuhp/5) S 2 0 0 0 -1 692391"..., 2048) = 152 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/49/status", O_RDONLY) = 6 +101575 read(6, "Name:\tcpuhp/5\nUmask:\t0000\nState:"..., 2048) = 729 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/49/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/50", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/50/stat", O_RDONLY) = 6 +101575 read(6, "50 (idle_inject/5) S 2 0 0 0 -1 "..., 2048) = 160 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/50/status", O_RDONLY) = 6 +101575 read(6, "Name:\tidle_inject/5\nUmask:\t0000\n"..., 2048) = 734 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/50/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/51", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/51/stat", O_RDONLY) = 6 +101575 read(6, "51 (migration/5) S 2 0 0 0 -1 69"..., 2048) = 160 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/51/status", O_RDONLY) = 6 +101575 read(6, "Name:\tmigration/5\nUmask:\t0000\nSt"..., 2048) = 735 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/51/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/52", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/52/stat", O_RDONLY) = 6 +101575 read(6, "52 (rcuc/5) S 2 0 0 0 -1 6923884"..., 2048) = 151 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/52/status", O_RDONLY) = 6 +101575 read(6, "Name:\trcuc/5\nUmask:\t0000\nState:\t"..., 2048) = 727 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/52/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/53", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/53/stat", O_RDONLY) = 6 +101575 read(6, "53 (ksoftirqd/5) S 2 0 0 0 -1 69"..., 2048) = 158 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/53/status", O_RDONLY) = 6 +101575 read(6, "Name:\tksoftirqd/5\nUmask:\t0000\nSt"..., 2048) = 740 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/53/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/55", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/55/stat", O_RDONLY) = 6 +101575 read(6, "55 (kworker/5:0H-kblockd) I 2 0 "..., 2048) = 166 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/55/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/5:0H-kblockd\nUmask"..., 2048) = 737 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/55/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/56", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/56/stat", O_RDONLY) = 6 +101575 read(6, "56 (cpuhp/6) S 2 0 0 0 -1 692391"..., 2048) = 152 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/56/status", O_RDONLY) = 6 +101575 read(6, "Name:\tcpuhp/6\nUmask:\t0000\nState:"..., 2048) = 729 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/56/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/57", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/57/stat", O_RDONLY) = 6 +101575 read(6, "57 (idle_inject/6) S 2 0 0 0 -1 "..., 2048) = 160 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/57/status", O_RDONLY) = 6 +101575 read(6, "Name:\tidle_inject/6\nUmask:\t0000\n"..., 2048) = 734 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/57/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/58", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/58/stat", O_RDONLY) = 6 +101575 read(6, "58 (migration/6) S 2 0 0 0 -1 69"..., 2048) = 160 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/58/status", O_RDONLY) = 6 +101575 read(6, "Name:\tmigration/6\nUmask:\t0000\nSt"..., 2048) = 735 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/58/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/59", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/59/stat", O_RDONLY) = 6 +101575 read(6, "59 (rcuc/6) S 2 0 0 0 -1 6923884"..., 2048) = 151 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/59/status", O_RDONLY) = 6 +101575 read(6, "Name:\trcuc/6\nUmask:\t0000\nState:\t"..., 2048) = 727 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/59/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/60", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/60/stat", O_RDONLY) = 6 +101575 read(6, "60 (ksoftirqd/6) S 2 0 0 0 -1 69"..., 2048) = 158 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/60/status", O_RDONLY) = 6 +101575 read(6, "Name:\tksoftirqd/6\nUmask:\t0000\nSt"..., 2048) = 738 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/60/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/62", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/62/stat", O_RDONLY) = 6 +101575 read(6, "62 (kworker/6:0H-events_highpri)"..., 2048) = 173 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/62/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/6:0H-events_highpr"..., 2048) = 744 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/62/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/63", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/63/stat", O_RDONLY) = 6 +101575 read(6, "63 (cpuhp/7) S 2 0 0 0 -1 692391"..., 2048) = 152 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/63/status", O_RDONLY) = 6 +101575 read(6, "Name:\tcpuhp/7\nUmask:\t0000\nState:"..., 2048) = 729 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/63/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/64", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/64/stat", O_RDONLY) = 6 +101575 read(6, "64 (idle_inject/7) S 2 0 0 0 -1 "..., 2048) = 160 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/64/status", O_RDONLY) = 6 +101575 read(6, "Name:\tidle_inject/7\nUmask:\t0000\n"..., 2048) = 734 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/64/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/65", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/65/stat", O_RDONLY) = 6 +101575 read(6, "65 (migration/7) S 2 0 0 0 -1 69"..., 2048) = 160 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/65/status", O_RDONLY) = 6 +101575 read(6, "Name:\tmigration/7\nUmask:\t0000\nSt"..., 2048) = 735 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/65/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/66", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/66/stat", O_RDONLY) = 6 +101575 read(6, "66 (rcuc/7) S 2 0 0 0 -1 6923884"..., 2048) = 151 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/66/status", O_RDONLY) = 6 +101575 read(6, "Name:\trcuc/7\nUmask:\t0000\nState:\t"..., 2048) = 727 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/66/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/67", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/67/stat", O_RDONLY) = 6 +101575 read(6, "67 (ksoftirqd/7) S 2 0 0 0 -1 69"..., 2048) = 158 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/67/status", O_RDONLY) = 6 +101575 read(6, "Name:\tksoftirqd/7\nUmask:\t0000\nSt"..., 2048) = 737 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/67/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/68", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/68/stat", O_RDONLY) = 6 +101575 read(6, "68 (kworker/7:0-mm_percpu_wq) I "..., 2048) = 170 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/68/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/7:0-mm_percpu_wq\nU"..., 2048) = 746 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/68/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/69", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/69/stat", O_RDONLY) = 6 +101575 read(6, "69 (kworker/7:0H-events_highpri)"..., 2048) = 173 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/69/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/7:0H-events_highpr"..., 2048) = 744 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/69/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/70", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/70/stat", O_RDONLY) = 6 +101575 read(6, "70 (kdevtmpfs) S 2 0 0 0 -1 2130"..., 2048) = 153 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/70/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkdevtmpfs\nUmask:\t0022\nStat"..., 2048) = 734 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/70/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/71", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/71/stat", O_RDONLY) = 6 +101575 read(6, "71 (netns) I 2 0 0 0 -1 69238880"..., 2048) = 151 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/71/status", O_RDONLY) = 6 +101575 read(6, "Name:\tnetns\nUmask:\t0000\nState:\tI"..., 2048) = 724 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/71/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 write(1, "UID PID PPID C STIM"..., 4096) = 4096 +101576 <... read resumed>"UID PID PPID C STIM"..., 98304) = 4096 +101575 newfstatat(AT_FDCWD, "/proc/72", +101576 read(0, +101575 <... newfstatat resumed>{st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/72/stat", O_RDONLY) = 6 +101575 read(6, "72 (inet_frag_wq) I 2 0 0 0 -1 6"..., 2048) = 158 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/72/status", O_RDONLY) = 6 +101575 read(6, "Name:\tinet_frag_wq\nUmask:\t0000\nS"..., 2048) = 731 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/72/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/73", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/73/stat", O_RDONLY) = 6 +101575 read(6, "73 (kauditd) S 2 0 0 0 -1 107583"..., 2048) = 154 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/73/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkauditd\nUmask:\t0000\nState:"..., 2048) = 732 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/73/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/74", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/74/stat", O_RDONLY) = 6 +101575 read(6, "74 (khungtaskd) S 2 0 0 0 -1 212"..., 2048) = 154 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/74/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkhungtaskd\nUmask:\t0000\nSta"..., 2048) = 735 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/74/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/75", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/75/stat", O_RDONLY) = 6 +101575 read(6, "75 (oom_reaper) S 2 0 0 0 -1 107"..., 2048) = 157 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/75/status", O_RDONLY) = 6 +101575 read(6, "Name:\toom_reaper\nUmask:\t0000\nSta"..., 2048) = 733 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/75/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/76", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/76/stat", O_RDONLY) = 6 +101575 read(6, "76 (writeback) I 2 0 0 0 -1 6923"..., 2048) = 155 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/76/status", O_RDONLY) = 6 +101575 read(6, "Name:\twriteback\nUmask:\t0000\nStat"..., 2048) = 728 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/76/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/77", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/77/stat", O_RDONLY) = 6 +101575 read(6, "77 (kcompactd0) S 2 0 0 0 -1 107"..., 2048) = 159 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/77/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkcompactd0\nUmask:\t0000\nSta"..., 2048) = 738 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/77/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/78", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/78/stat", O_RDONLY) = 6 +101575 read(6, "78 (ksmd) S 2 0 0 0 -1 107583904"..., 2048) = 151 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/78/status", O_RDONLY) = 6 +101575 read(6, "Name:\tksmd\nUmask:\t0000\nState:\tS "..., 2048) = 727 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/78/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/79", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/79/stat", O_RDONLY) = 6 +101575 read(6, "79 (khugepaged) S 2 0 0 0 -1 107"..., 2048) = 158 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/79/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkhugepaged\nUmask:\t0000\nSta"..., 2048) = 733 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/79/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/89", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/89/stat", O_RDONLY) = 6 +101575 read(6, "89 (kworker/1:1-events) I 2 0 0 "..., 2048) = 164 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/89/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/1:1-events\nUmask:\t"..., 2048) = 740 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/89/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/100", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/100/stat", O_RDONLY) = 6 +101575 read(6, "100 (kintegrityd) I 2 0 0 0 -1 6"..., 2048) = 158 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/100/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkintegrityd\nUmask:\t0000\nSt"..., 2048) = 734 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/100/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/101", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/101/stat", O_RDONLY) = 6 +101575 read(6, "101 (kblockd) I 2 0 0 0 -1 69238"..., 2048) = 154 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/101/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkblockd\nUmask:\t0000\nState:"..., 2048) = 730 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/101/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/102", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/102/stat", O_RDONLY) = 6 +101575 read(6, "102 (blkcg_punt_bio) I 2 0 0 0 -"..., 2048) = 161 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/102/status", O_RDONLY) = 6 +101575 read(6, "Name:\tblkcg_punt_bio\nUmask:\t0000"..., 2048) = 737 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/102/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/105", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/105/stat", O_RDONLY) = 6 +101575 read(6, "105 (ata_sff) I 2 0 0 0 -1 69238"..., 2048) = 154 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/105/status", O_RDONLY) = 6 +101575 read(6, "Name:\tata_sff\nUmask:\t0000\nState:"..., 2048) = 730 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/105/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/106", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/106/stat", O_RDONLY) = 6 +101575 read(6, "106 (edac-poller) I 2 0 0 0 -1 6"..., 2048) = 158 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/106/status", O_RDONLY) = 6 +101575 read(6, "Name:\tedac-poller\nUmask:\t0000\nSt"..., 2048) = 734 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/106/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/107", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/107/stat", O_RDONLY) = 6 +101575 read(6, "107 (devfreq_wq) I 2 0 0 0 -1 69"..., 2048) = 157 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/107/status", O_RDONLY) = 6 +101575 read(6, "Name:\tdevfreq_wq\nUmask:\t0000\nSta"..., 2048) = 733 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/107/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/108", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/108/stat", O_RDONLY) = 6 +101575 read(6, "108 (watchdogd) S 2 0 0 0 -1 212"..., 2048) = 156 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/108/status", O_RDONLY) = 6 +101575 read(6, "Name:\twatchdogd\nUmask:\t0000\nStat"..., 2048) = 736 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/108/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/109", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/109/stat", O_RDONLY) = 6 +101575 read(6, "109 (kworker/4:1H-events_highpri"..., 2048) = 175 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/109/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/4:1H-events_highpr"..., 2048) = 753 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/109/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/110", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/110/stat", O_RDONLY) = 6 +101575 read(6, "110 (ksgxd) S 2 0 0 0 -1 1075839"..., 2048) = 153 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/110/status", O_RDONLY) = 6 +101575 read(6, "Name:\tksgxd\nUmask:\t0000\nState:\tS"..., 2048) = 733 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/110/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/111", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/111/stat", O_RDONLY) = 6 +101575 read(6, "111 (kswapd0) S 2 0 0 0 -1 10618"..., 2048) = 156 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/111/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkswapd0\nUmask:\t0000\nState:"..., 2048) = 740 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/111/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/114", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/114/stat", O_RDONLY) = 6 +101575 read(6, "114 (kthrotld) I 2 0 0 0 -1 6923"..., 2048) = 155 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/114/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkthrotld\nUmask:\t0000\nState"..., 2048) = 731 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/114/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/115", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/115/stat", O_RDONLY) = 6 +101575 read(6, "115 (irq/122-pciehp) S 2 0 0 0 -"..., 2048) = 161 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/115/status", O_RDONLY) = 6 +101575 read(6, "Name:\tirq/122-pciehp\nUmask:\t0000"..., 2048) = 739 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/115/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/116", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/116/stat", O_RDONLY) = 6 +101575 read(6, "116 (irq/124-pciehp) S 2 0 0 0 -"..., 2048) = 161 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/116/status", O_RDONLY) = 6 +101575 read(6, "Name:\tirq/124-pciehp\nUmask:\t0000"..., 2048) = 739 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/116/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/117", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/117/stat", O_RDONLY) = 6 +101575 read(6, "117 (irq/126-pciehp) S 2 0 0 0 -"..., 2048) = 161 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/117/status", O_RDONLY) = 6 +101575 read(6, "Name:\tirq/126-pciehp\nUmask:\t0000"..., 2048) = 739 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/117/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/122", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/122/stat", O_RDONLY) = 6 +101575 read(6, "122 (acpi_thermal_pm) I 2 0 0 0 "..., 2048) = 162 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/122/status", O_RDONLY) = 6 +101575 read(6, "Name:\tacpi_thermal_pm\nUmask:\t000"..., 2048) = 738 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/122/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/123", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/123/stat", O_RDONLY) = 6 +101575 read(6, "123 (nvme-wq) I 2 0 0 0 -1 69238"..., 2048) = 154 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/123/status", O_RDONLY) = 6 +101575 read(6, "Name:\tnvme-wq\nUmask:\t0000\nState:"..., 2048) = 730 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/123/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/124", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/124/stat", O_RDONLY) = 6 +101575 read(6, "124 (nvme-reset-wq) I 2 0 0 0 -1"..., 2048) = 160 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/124/status", O_RDONLY) = 6 +101575 read(6, "Name:\tnvme-reset-wq\nUmask:\t0000\n"..., 2048) = 736 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/124/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/125", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/125/stat", O_RDONLY) = 6 +101575 read(6, "125 (nvme-delete-wq) I 2 0 0 0 -"..., 2048) = 161 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/125/status", O_RDONLY) = 6 +101575 read(6, "Name:\tnvme-delete-wq\nUmask:\t0000"..., 2048) = 737 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/125/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/126", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/126/stat", O_RDONLY) = 6 +101575 read(6, "126 (scsi_eh_0) S 2 0 0 0 -1 212"..., 2048) = 154 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/126/status", O_RDONLY) = 6 +101575 read(6, "Name:\tscsi_eh_0\nUmask:\t0000\nStat"..., 2048) = 736 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/126/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/127", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/127/stat", O_RDONLY) = 6 +101575 read(6, "127 (scsi_tmf_0) I 2 0 0 0 -1 69"..., 2048) = 157 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/127/status", O_RDONLY) = 6 +101575 read(6, "Name:\tscsi_tmf_0\nUmask:\t0000\nSta"..., 2048) = 733 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/127/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/128", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/128/stat", O_RDONLY) = 6 +101575 read(6, "128 (scsi_eh_1) S 2 0 0 0 -1 212"..., 2048) = 154 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/128/status", O_RDONLY) = 6 +101575 read(6, "Name:\tscsi_eh_1\nUmask:\t0000\nStat"..., 2048) = 736 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/128/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/129", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/129/stat", O_RDONLY) = 6 +101575 read(6, "129 (scsi_tmf_1) I 2 0 0 0 -1 69"..., 2048) = 157 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/129/status", O_RDONLY) = 6 +101575 read(6, "Name:\tscsi_tmf_1\nUmask:\t0000\nSta"..., 2048) = 733 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/129/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/130", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/130/stat", O_RDONLY) = 6 +101575 read(6, "130 (scsi_eh_2) S 2 0 0 0 -1 212"..., 2048) = 154 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/130/status", O_RDONLY) = 6 +101575 read(6, "Name:\tscsi_eh_2\nUmask:\t0000\nStat"..., 2048) = 737 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/130/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/131", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/131/stat", O_RDONLY) = 6 +101575 read(6, "131 (scsi_tmf_2) I 2 0 0 0 -1 69"..., 2048) = 157 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/131/status", O_RDONLY) = 6 +101575 read(6, "Name:\tscsi_tmf_2\nUmask:\t0000\nSta"..., 2048) = 733 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/131/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/135", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/135/stat", O_RDONLY) = 6 +101575 read(6, "135 (mld) I 2 0 0 0 -1 69238880 "..., 2048) = 150 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/135/status", O_RDONLY) = 6 +101575 read(6, "Name:\tmld\nUmask:\t0000\nState:\tI ("..., 2048) = 726 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/135/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/136", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/136/stat", O_RDONLY) = 6 +101575 read(6, "136 (ipv6_addrconf) I 2 0 0 0 -1"..., 2048) = 160 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/136/status", O_RDONLY) = 6 +101575 read(6, "Name:\tipv6_addrconf\nUmask:\t0000\n"..., 2048) = 736 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/136/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/146", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/146/stat", O_RDONLY) = 6 +101575 read(6, "146 (kstrp) I 2 0 0 0 -1 6923888"..., 2048) = 152 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/146/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkstrp\nUmask:\t0000\nState:\tI"..., 2048) = 728 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/146/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/151", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/151/stat", O_RDONLY) = 6 +101575 read(6, "151 (zswap1) I 2 0 0 0 -1 692388"..., 2048) = 153 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/151/status", O_RDONLY) = 6 +101575 read(6, "Name:\tzswap1\nUmask:\t0000\nState:\t"..., 2048) = 729 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/151/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/152", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/152/stat", O_RDONLY) = 6 +101575 read(6, "152 (zswap1) I 2 0 0 0 -1 692388"..., 2048) = 153 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/152/status", O_RDONLY) = 6 +101575 read(6, "Name:\tzswap1\nUmask:\t0000\nState:\t"..., 2048) = 729 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/152/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/153", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/153/stat", O_RDONLY) = 6 +101575 read(6, "153 (zswap-shrink) I 2 0 0 0 -1 "..., 2048) = 159 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/153/status", O_RDONLY) = 6 +101575 read(6, "Name:\tzswap-shrink\nUmask:\t0000\nS"..., 2048) = 735 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/153/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/155", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/155/stat", O_RDONLY) = 6 +101575 read(6, "155 (charger_manager) I 2 0 0 0 "..., 2048) = 162 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/155/status", O_RDONLY) = 6 +101575 read(6, "Name:\tcharger_manager\nUmask:\t000"..., 2048) = 738 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/155/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/156", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/156/stat", O_RDONLY) = 6 +101575 read(6, "156 (kworker/5:1H-events_highpri"..., 2048) = 175 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/156/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/5:1H-events_highpr"..., 2048) = 753 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/156/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/169", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/169/stat", O_RDONLY) = 6 +101575 read(6, "169 (kworker/6:1H-events_highpri"..., 2048) = 176 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/169/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/6:1H-events_highpr"..., 2048) = 753 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/169/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/178", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/178/stat", O_RDONLY) = 6 +101575 read(6, "178 (kworker/0:1H-events_highpri"..., 2048) = 176 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/178/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/0:1H-events_highpr"..., 2048) = 752 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/178/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/185", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/185/stat", O_RDONLY) = 6 +101575 read(6, "185 (kworker/1:1H-kblockd) I 2 0"..., 2048) = 170 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/185/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/1:1H-kblockd\nUmask"..., 2048) = 746 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/185/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/206", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/206/stat", O_RDONLY) = 6 +101575 read(6, "206 (jbd2/sda6-8) S 2 0 0 0 -1 2"..., 2048) = 159 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/206/status", O_RDONLY) = 6 +101575 read(6, "Name:\tjbd2/sda6-8\nUmask:\t0000\nSt"..., 2048) = 746 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/206/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/207", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/207/stat", O_RDONLY) = 6 +101575 read(6, "207 (ext4-rsv-conver) I 2 0 0 0 "..., 2048) = 163 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/207/status", O_RDONLY) = 6 +101575 read(6, "Name:\text4-rsv-conver\nUmask:\t000"..., 2048) = 738 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/207/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/212", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/212/stat", O_RDONLY) = 6 +101575 read(6, "212 (kworker/7:1H-events_highpri"..., 2048) = 176 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/212/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/7:1H-events_highpr"..., 2048) = 752 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/212/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/221", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/221/stat", O_RDONLY) = 6 +101575 read(6, "221 (kworker/2:1H-kblockd) I 2 0"..., 2048) = 169 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/221/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/2:1H-kblockd\nUmask"..., 2048) = 746 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/221/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/223", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/223/stat", O_RDONLY) = 6 +101575 read(6, "223 (kworker/3:1H-kblockd) I 2 0"..., 2048) = 169 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/223/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/3:1H-kblockd\nUmask"..., 2048) = 746 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/223/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/245", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/245/stat", O_RDONLY) = 6 +101575 read(6, "245 (systemd-journal) S 1 245 24"..., 2048) = 182 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/245/status", O_RDONLY) = 6 +101575 read(6, "Name:\tsystemd-journal\nUmask:\t002"..., 2048) = 1115 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/245/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/lib/systemd/systemd-journal"..., 131072) = 34 +101575 read(6, "", 131038) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/260", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/260/stat", O_RDONLY) = 6 +101575 read(6, "260 (systemd-udevd) S 1 260 260 "..., 2048) = 186 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/260/status", O_RDONLY) = 6 +101575 read(6, "Name:\tsystemd-udevd\nUmask:\t0022\n"..., 2048) = 1114 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/260/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/lib/systemd/systemd-udevd\0", 131072) = 31 +101575 read(6, "", 131041) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/296", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/296/stat", O_RDONLY) = 6 +101575 read(6, "296 (tpm_dev_wq) I 2 0 0 0 -1 69"..., 2048) = 158 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/296/status", O_RDONLY) = 6 +101575 read(6, "Name:\ttpm_dev_wq\nUmask:\t0000\nSta"..., 2048) = 733 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/296/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/299", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/299/stat", O_RDONLY) = 6 +101575 read(6, "299 (scsi_eh_3) S 2 0 0 0 -1 212"..., 2048) = 155 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/299/status", O_RDONLY) = 6 +101575 read(6, "Name:\tscsi_eh_3\nUmask:\t0000\nStat"..., 2048) = 736 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/299/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/300", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/300/stat", O_RDONLY) = 6 +101575 read(6, "300 (scsi_tmf_3) I 2 0 0 0 -1 69"..., 2048) = 158 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/300/status", O_RDONLY) = 6 +101575 read(6, "Name:\tscsi_tmf_3\nUmask:\t0000\nSta"..., 2048) = 733 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/300/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/301", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/301/stat", O_RDONLY) = 6 +101575 read(6, "301 (usb-storage) S 2 0 0 0 -1 2"..., 2048) = 159 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/301/status", O_RDONLY) = 6 +101575 read(6, "Name:\tusb-storage\nUmask:\t0000\nSt"..., 2048) = 743 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/301/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/306", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/306/stat", O_RDONLY) = 6 +101575 read(6, "306 (uas) I 2 0 0 0 -1 69238880 "..., 2048) = 151 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/306/status", O_RDONLY) = 6 +101575 read(6, "Name:\tuas\nUmask:\t0000\nState:\tI ("..., 2048) = 726 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/306/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/307", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/307/stat", O_RDONLY) = 6 +101575 read(6, "307 (ktpacpid) I 2 0 0 0 -1 6923"..., 2048) = 156 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/307/status", O_RDONLY) = 6 +101575 read(6, "Name:\tktpacpid\nUmask:\t0000\nState"..., 2048) = 731 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/307/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/308", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/308/stat", O_RDONLY) = 6 +101575 read(6, "308 (irq/131-mei_me) S 2 0 0 0 -"..., 2048) = 162 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/308/status", O_RDONLY) = 6 +101575 read(6, "Name:\tirq/131-mei_me\nUmask:\t0000"..., 2048) = 740 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/308/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/327", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/327/stat", O_RDONLY) = 6 +101575 read(6, "327 (cfg80211) I 2 0 0 0 -1 6923"..., 2048) = 156 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/327/status", O_RDONLY) = 6 +101575 read(6, "Name:\tcfg80211\nUmask:\t0000\nState"..., 2048) = 731 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/327/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/335", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/335/stat", O_RDONLY) = 6 +101575 read(6, "335 (cryptd) I 2 0 0 0 -1 692388"..., 2048) = 154 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/335/status", O_RDONLY) = 6 +101575 read(6, "Name:\tcryptd\nUmask:\t0000\nState:\t"..., 2048) = 729 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/335/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/336", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/336/stat", O_RDONLY) = 6 +101575 read(6, "336 (irq/149-iwlwifi) S 2 0 0 0 "..., 2048) = 165 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/336/status", O_RDONLY) = 6 +101575 read(6, "Name:\tirq/149-iwlwifi\nUmask:\t000"..., 2048) = 745 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/336/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 write(1, " 2 0 17:25 ? 00:00:00 [n"..., 4096) = 4096 +101576 <... read resumed>" 2 0 17:25 ? 00:00:00 [n"..., 94208) = 4096 +101575 newfstatat(AT_FDCWD, "/proc/360", +101576 newfstatat(1, "", +101575 <... newfstatat resumed>{st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101576 <... newfstatat resumed>{st_mode=S_IFIFO|0600, st_size=0, ...}, AT_EMPTY_PATH) = 0 +101575 openat(AT_FDCWD, "/proc/360/stat", O_RDONLY +101576 read(0, +101575 <... openat resumed>) = 6 +101575 read(6, "360 (card0-crtc0) S 2 0 0 0 -1 2"..., 2048) = 159 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/360/status", O_RDONLY) = 6 +101575 read(6, "Name:\tcard0-crtc0\nUmask:\t0000\nSt"..., 2048) = 738 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/360/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/361", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/361/stat", O_RDONLY) = 6 +101575 read(6, "361 (card0-crtc1) S 2 0 0 0 -1 2"..., 2048) = 159 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/361/status", O_RDONLY) = 6 +101575 read(6, "Name:\tcard0-crtc1\nUmask:\t0000\nSt"..., 2048) = 738 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/361/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/362", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/362/stat", O_RDONLY) = 6 +101575 read(6, "362 (card0-crtc2) S 2 0 0 0 -1 2"..., 2048) = 159 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/362/status", O_RDONLY) = 6 +101575 read(6, "Name:\tcard0-crtc2\nUmask:\t0000\nSt"..., 2048) = 738 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/362/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/369", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/369/stat", O_RDONLY) = 6 +101575 read(6, "369 (bluetoothd) S 1 369 369 0 -"..., 2048) = 171 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/369/status", O_RDONLY) = 6 +101575 read(6, "Name:\tbluetoothd\nUmask:\t0077\nSta"..., 2048) = 1096 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/369/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/lib/bluetooth/bluetoothd\0-E"..., 131072) = 33 +101575 read(6, "", 131039) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/370", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/370/stat", O_RDONLY) = 6 +101575 read(6, "370 (dbus-daemon) S 1 370 370 0 "..., 2048) = 175 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/370/status", O_RDONLY) = 6 +101575 read(6, "Name:\tdbus-daemon\nUmask:\t0022\nSt"..., 2048) = 1108 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/etc/nsswitch.conf", {st_mode=S_IFREG|0644, st_size=328, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 6 +101575 newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=1257, ...}, AT_EMPTY_PATH) = 0 +101575 lseek(6, 0, SEEK_SET) = 0 +101575 read(6, "root:x:0:0::/root:/bin/bash\nbin:"..., 4096) = 1257 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/370/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/bin/dbus-daemon\0--system\0--"..., 131072) = 105 +101575 read(6, "", 130967) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/371", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/371/stat", O_RDONLY) = 6 +101575 read(6, "371 (NetworkManager) S 1 371 371"..., 2048) = 182 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/371/status", O_RDONLY) = 6 +101575 read(6, "Name:\tNetworkManager\nUmask:\t0022"..., 2048) = 1103 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/371/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/bin/NetworkManager\0--no-dae"..., 131072) = 36 +101575 read(6, "", 131036) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/374", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/374/stat", O_RDONLY) = 6 +101575 read(6, "374 (systemd-logind) S 1 374 374"..., 2048) = 175 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/374/status", O_RDONLY) = 6 +101575 read(6, "Name:\tsystemd-logind\nUmask:\t0022"..., 2048) = 1113 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/374/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/lib/systemd/systemd-logind\0", 131072) = 32 +101575 read(6, "", 131040) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/391", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/391/stat", O_RDONLY) = 6 +101575 read(6, "391 (auto-cpufreq) S 1 391 391 0"..., 2048) = 198 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/391/status", O_RDONLY) = 6 +101575 read(6, "Name:\tauto-cpufreq\nUmask:\t0022\nS"..., 2048) = 1103 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/391/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/bin/python\0/usr/bin/auto-cp"..., 131072) = 47 +101575 read(6, "", 131025) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/392", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/392/stat", O_RDONLY) = 6 +101575 read(6, "392 (cupsd) S 1 392 392 0 -1 419"..., 2048) = 166 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/392/status", O_RDONLY) = 6 +101575 read(6, "Name:\tcupsd\nUmask:\t0022\nState:\tS"..., 2048) = 1091 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/392/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/bin/cupsd\0-l\0", 131072) = 18 +101575 read(6, "", 131054) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/393", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/393/stat", O_RDONLY) = 6 +101575 read(6, "393 (sshd) S 1 393 393 0 -1 4194"..., 2048) = 164 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/393/status", O_RDONLY) = 6 +101575 read(6, "Name:\tsshd\nUmask:\t0022\nState:\tS "..., 2048) = 1088 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/393/cmdline", O_RDONLY) = 6 +101575 read(6, "sshd: /usr/bin/sshd -D [listener"..., 131072) = 55 +101575 read(6, "", 131017) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/397", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/397/stat", O_RDONLY) = 6 +101575 read(6, "397 (lightdm) S 1 397 397 0 -1 4"..., 2048) = 176 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/397/status", O_RDONLY) = 6 +101575 read(6, "Name:\tlightdm\nUmask:\t0022\nState:"..., 2048) = 1093 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/397/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/bin/lightdm\0", 131072) = 17 +101575 read(6, "", 131055) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/404", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/404/stat", O_RDONLY) = 6 +101575 read(6, "404 (Xorg) S 397 404 404 1031 40"..., 2048) = 196 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/404/status", O_RDONLY) = 6 +101575 read(6, "Name:\tXorg\nUmask:\t0022\nState:\tS "..., 2048) = 1100 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/404/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/lib/Xorg\0:0\0-seat\0seat0\0-au"..., 131072) = 86 +101575 read(6, "", 130986) = 0 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/tty/drivers", O_RDONLY) = 6 +101575 read(6, "/dev/tty /dev/tty "..., 9999) = 569 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/dev/tty7", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x4, 0x7), ...}, 0) = 0 +101575 newfstatat(AT_FDCWD, "/proc/447", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/447/stat", O_RDONLY) = 6 +101575 read(6, "447 (irq/152-rmi4_sm) S 2 0 0 0 "..., 2048) = 163 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/447/status", O_RDONLY) = 6 +101575 read(6, "Name:\tirq/152-rmi4_sm\nUmask:\t000"..., 2048) = 743 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/447/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/448", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/448/stat", O_RDONLY) = 6 +101575 read(6, "448 (scsi_eh_4) S 2 0 0 0 -1 212"..., 2048) = 155 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/448/status", O_RDONLY) = 6 +101575 read(6, "Name:\tscsi_eh_4\nUmask:\t0000\nStat"..., 2048) = 736 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/448/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/449", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/449/stat", O_RDONLY) = 6 +101575 read(6, "449 (scsi_tmf_4) I 2 0 0 0 -1 69"..., 2048) = 158 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/449/status", O_RDONLY) = 6 +101575 read(6, "Name:\tscsi_tmf_4\nUmask:\t0000\nSta"..., 2048) = 733 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/449/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/450", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/450/stat", O_RDONLY) = 6 +101575 read(6, "450 (usb-storage) S 2 0 0 0 -1 2"..., 2048) = 159 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/450/status", O_RDONLY) = 6 +101575 read(6, "Name:\tusb-storage\nUmask:\t0000\nSt"..., 2048) = 743 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/450/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/456", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/456/stat", O_RDONLY) = 6 +101575 read(6, "456 (wpa_supplicant) S 1 456 456"..., 2048) = 181 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/456/status", O_RDONLY) = 6 +101575 read(6, "Name:\twpa_supplicant\nUmask:\t0022"..., 2048) = 1102 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/456/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/bin/wpa_supplicant\0-u\0-s\0-O"..., 131072) = 53 +101575 read(6, "", 131019) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/552", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/552/stat", O_RDONLY) = 6 +101575 read(6, "552 (lightdm) S 397 397 397 0 -1"..., 2048) = 170 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/552/status", O_RDONLY) = 6 +101575 read(6, "Name:\tlightdm\nUmask:\t0022\nState:"..., 2048) = 1104 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/552/cmdline", O_RDONLY) = 6 +101575 read(6, "lightdm\0--session-child\00014\00021\0", 131072) = 30 +101575 read(6, "", 131042) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/576", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/576/stat", O_RDONLY) = 6 +101575 read(6, "576 (ntpd) S 1 576 576 0 -1 4194"..., 2048) = 166 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/576/status", O_RDONLY) = 6 +101575 read(6, "Name:\tntpd\nUmask:\t0022\nState:\tS "..., 2048) = 1102 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/etc/nsswitch.conf", {st_mode=S_IFREG|0644, st_size=328, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 6 +101575 newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=1257, ...}, AT_EMPTY_PATH) = 0 +101575 lseek(6, 0, SEEK_SET) = 0 +101575 read(6, "root:x:0:0::/root:/bin/bash\nbin:"..., 4096) = 1257 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/576/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/bin/ntpd\0-g\0-u\0ntp:ntp\0", 131072) = 28 +101575 read(6, "", 131044) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/610", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/610/stat", O_RDONLY) = 6 +101575 read(6, "610 (systemd) S 1 610 610 0 -1 4"..., 2048) = 312 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/610/status", O_RDONLY) = 6 +101575 read(6, "Name:\tsystemd\nUmask:\t0022\nState:"..., 2048) = 1124 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/etc/nsswitch.conf", {st_mode=S_IFREG|0644, st_size=328, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 6 +101575 newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=1257, ...}, AT_EMPTY_PATH) = 0 +101575 lseek(6, 0, SEEK_SET) = 0 +101575 read(6, "root:x:0:0::/root:/bin/bash\nbin:"..., 4096) = 1257 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/610/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/lib/systemd/systemd\0--user\0", 131072) = 32 +101575 read(6, "", 131040) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/611", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/611/stat", O_RDONLY) = 6 +101575 read(6, "611 ((sd-pam)) S 610 610 610 0 -"..., 2048) = 168 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/611/status", O_RDONLY) = 6 +101575 read(6, "Name:\t(sd-pam)\nUmask:\t0022\nState"..., 2048) = 1113 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/611/cmdline", O_RDONLY) = 6 +101575 read(6, "(sd-pam)\0", 131072) = 9 +101575 read(6, "", 131063) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/625", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/625/stat", O_RDONLY) = 6 +101575 read(6, "625 (i3) S 552 625 625 0 -1 4194"..., 2048) = 312 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/625/status", O_RDONLY) = 6 +101575 read(6, "Name:\ti3\nUmask:\t0022\nState:\tS (s"..., 2048) = 1126 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/625/cmdline", O_RDONLY) = 6 +101575 read(6, "i3\0", 131072) = 3 +101575 read(6, "", 131069) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/632", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/632/stat", O_RDONLY) = 6 +101575 read(6, "632 (dbus-daemon) S 610 632 632 "..., 2048) = 315 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/632/status", O_RDONLY) = 6 +101575 read(6, "Name:\tdbus-daemon\nUmask:\t0022\nSt"..., 2048) = 1134 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/632/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/bin/dbus-daemon\0--session\0-"..., 131072) = 106 +101575 read(6, "", 130966) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/645", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/645/stat", O_RDONLY) = 6 +101575 read(6, "645 (picom) S 1 644 644 0 -1 419"..., 2048) = 308 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/645/status", O_RDONLY) = 6 +101575 read(6, "Name:\tpicom\nUmask:\t0022\nState:\tS"..., 2048) = 1128 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/645/cmdline", O_RDONLY) = 6 +101575 read(6, "picom\0-f\0", 131072) = 9 +101575 read(6, "", 131063) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/648", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/648/stat", O_RDONLY) = 6 +101575 read(6, "648 (polybar) S 1 640 640 0 -1 4"..., 2048) = 332 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/648/status", O_RDONLY) = 6 +101575 read(6, "Name:\tpolybar\nUmask:\t0022\nState:"..., 2048) = 1129 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/648/cmdline", O_RDONLY) = 6 +101575 read(6, "polybar\0example\0-c\0/home/framal/"..., 131072) = 66 +101575 read(6, "", 131006) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/653", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/653/stat", O_RDONLY) = 6 +101575 read(6, "653 (pulseaudio) S 610 653 653 0"..., 2048) = 322 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/653/status", O_RDONLY) = 6 +101575 read(6, "Name:\tpulseaudio\nUmask:\t0077\nSta"..., 2048) = 1150 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/653/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/bin/pulseaudio\0--daemonize="..., 131072) = 56 +101575 read(6, "", 131016) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/654", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/654/stat", O_RDONLY) = 6 +101575 read(6, "654 (rtkit-daemon) S 1 654 654 0"..., 2048) = 170 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/654/status", O_RDONLY) = 6 +101575 read(6, "Name:\trtkit-daemon\nUmask:\t0777\nS"..., 2048) = 1114 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/etc/nsswitch.conf", {st_mode=S_IFREG|0644, st_size=328, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 6 +101575 newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=1257, ...}, AT_EMPTY_PATH) = 0 +101575 lseek(6, 0, SEEK_SET) = 0 +101575 read(6, "root:x:0:0::/root:/bin/bash\nbin:"..., 4096) = 1257 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/654/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/lib/rtkit-daemon\0", 131072) = 22 +101575 read(6, "", 131050) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/657", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/657/stat", O_RDONLY) = 6 +101575 read(6, "657 (polkitd) S 1 657 657 0 -1 4"..., 2048) = 174 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/657/status", O_RDONLY) = 6 +101575 read(6, "Name:\tpolkitd\nUmask:\t0022\nState:"..., 2048) = 1117 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/etc/nsswitch.conf", {st_mode=S_IFREG|0644, st_size=328, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 6 +101575 newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=1257, ...}, AT_EMPTY_PATH) = 0 +101575 lseek(6, 0, SEEK_SET) = 0 +101575 read(6, "root:x:0:0::/root:/bin/bash\nbin:"..., 4096) = 1257 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/657/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/lib/polkit-1/polkitd\0--no-d"..., 131072) = 37 +101575 read(6, "", 131035) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/690", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/690/stat", O_RDONLY) = 6 +101575 read(6, "690 (gsettings-helpe) S 653 653 "..., 2048) = 311 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/690/status", O_RDONLY) = 6 +101575 read(6, "Name:\tgsettings-helpe\nUmask:\t007"..., 2048) = 1144 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/690/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/lib/pulse/gsettings-helper\0", 131072) = 32 +101575 read(6, "", 131040) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/696", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/696/stat", O_RDONLY) = 6 +101575 read(6, "696 (krfcommd) S 2 0 0 0 -1 2130"..., 2048) = 157 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/696/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkrfcommd\nUmask:\t0000\nState"..., 2048) = 735 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/696/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/1363", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/1363/stat", O_RDONLY) = 6 +101575 read(6, "1363 (at-spi-bus-laun) S 610 136"..., 2048) = 319 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1363/status", O_RDONLY) = 6 +101575 read(6, "Name:\tat-spi-bus-laun\nUmask:\t002"..., 2048) = 1138 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1363/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/lib/at-spi-bus-launcher\0", 131072) = 29 +101575 read(6, "", 131043) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/1677", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/1677/stat", O_RDONLY) = 6 +101575 read(6, "1677 (signal-desktop) S 1 1643 1"..., 2048) = 344 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1677/status", O_RDONLY) = 6 +101575 read(6, "Name:\tsignal-desktop\nUmask:\t0077"..., 2048) = 1144 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1677/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/lib/signal-desktop/signal-d"..., 131072) = 42 +101575 read(6, "", 131030) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/1680", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/1680/stat", O_RDONLY) = 6 +101575 read(6, "1680 (signal-desktop) S 1677 164"..., 2048) = 321 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1680/status", O_RDONLY) = 6 +101575 read(6, "Name:\tsignal-desktop\nUmask:\t0022"..., 2048) = 1138 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1680/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/lib/signal-desktop/signal-d"..., 131072) = 73 +101575 read(6, "", 130999) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/1681", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/1681/stat", O_RDONLY) = 6 +101575 read(6, "1681 (signal-desktop) S 1677 164"..., 2048) = 321 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1681/status", O_RDONLY) = 6 +101575 read(6, "Name:\tsignal-desktop\nUmask:\t0022"..., 2048) = 1147 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1681/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/lib/signal-desktop/signal-d"..., 131072) = 53 +101575 read(6, "", 131019) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/1683", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/1683/stat", O_RDONLY) = 6 +101575 read(6, "1683 (signal-desktop) S 1681 164"..., 2048) = 317 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1683/status", O_RDONLY) = 6 +101575 read(6, "Name:\tsignal-desktop\nUmask:\t0022"..., 2048) = 1145 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1683/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/lib/signal-desktop/signal-d"..., 131072) = 53 +101575 read(6, "", 131019) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/1752", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/1752/stat", O_RDONLY) = 6 +101575 read(6, "1752 (signal-desktop) S 1680 164"..., 2048) = 334 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1752/status", O_RDONLY) = 6 +101575 read(6, "Name:\tsignal-desktop\nUmask:\t0022"..., 2048) = 1149 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1752/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/lib/signal-desktop/signal-d"..., 131072) = 411 +101575 read(6, "", 130661) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/1769", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/1769/stat", O_RDONLY) = 6 +101575 read(6, "1769 (signal-desktop) S 1677 164"..., 2048) = 321 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1769/status", O_RDONLY) = 6 +101575 read(6, "Name:\tsignal-desktop\nUmask:\t0077"..., 2048) = 1138 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1769/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/lib/signal-desktop/signal-d"..., 131072) = 366 +101575 read(6, "", 130706) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/1807", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/1807/stat", O_RDONLY) = 6 +101575 read(6, "1807 (signal-desktop) S 1677 164"..., 2048) = 337 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1807/status", O_RDONLY) = 6 +101575 read(6, "Name:\tsignal-desktop\nUmask:\t0077"..., 2048) = 1149 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1807/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/lib/signal-desktop/signal-d"..., 131072) = 489 +101575 read(6, "", 130583) = 0 +101575 close(6) = 0 +101575 write(1, " 336 2 0 17:25 ? 0"..., 4096) = 4096 +101575 newfstatat(AT_FDCWD, "/proc/1821", +101576 <... read resumed>" 336 2 0 17:25 ? 0"..., 90112) = 4096 +101575 <... newfstatat resumed>{st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/1821/stat", O_RDONLY) = 6 +101576 read(0, +101575 read(6, "1821 (spotify) S 1 1779 1779 0 -"..., 2048) = 294 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1821/status", O_RDONLY) = 6 +101575 read(6, "Name:\tspotify\nUmask:\t0022\nState:"..., 2048) = 1137 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1821/cmdline", O_RDONLY) = 6 +101575 read(6, "/opt/spotify/spotify\0", 131072) = 21 +101575 read(6, "", 131051) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/1825", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/1825/stat", O_RDONLY) = 6 +101575 read(6, "1825 (spotify) S 1821 1779 1779 "..., 2048) = 284 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1825/status", O_RDONLY) = 6 +101575 read(6, "Name:\tspotify\nUmask:\t0022\nState:"..., 2048) = 1131 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1825/cmdline", O_RDONLY) = 6 +101575 read(6, "/opt/spotify/spotify --type=zygo"..., 131072) = 196 +101575 read(6, "", 130876) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/1826", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/1826/stat", O_RDONLY) = 6 +101575 read(6, "1826 (spotify) S 1821 1779 1779 "..., 2048) = 285 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1826/status", O_RDONLY) = 6 +101575 read(6, "Name:\tspotify\nUmask:\t0022\nState:"..., 2048) = 1131 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1826/cmdline", O_RDONLY) = 6 +101575 read(6, "/opt/spotify/spotify --type=zygo"..., 131072) = 176 +101575 read(6, "", 130896) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/1841", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/1841/stat", O_RDONLY) = 6 +101575 read(6, "1841 (spotify) S 1825 1779 1779 "..., 2048) = 295 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1841/status", O_RDONLY) = 6 +101575 read(6, "Name:\tspotify\nUmask:\t0022\nState:"..., 2048) = 1141 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1841/cmdline", O_RDONLY) = 6 +101575 read(6, "/opt/spotify/spotify --type=gpu-"..., 131072) = 459 +101575 read(6, "", 130613) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/1848", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/1848/stat", O_RDONLY) = 6 +101575 read(6, "1848 (dbus-daemon) S 1363 1363 1"..., 2048) = 314 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1848/status", O_RDONLY) = 6 +101575 read(6, "Name:\tdbus-daemon\nUmask:\t0022\nSt"..., 2048) = 1138 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1848/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/bin/dbus-daemon\0--config-fi"..., 131072) = 109 +101575 read(6, "", 130963) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/1857", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/1857/stat", O_RDONLY) = 6 +101575 read(6, "1857 (at-spi2-registr) S 610 136"..., 2048) = 318 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1857/status", O_RDONLY) = 6 +101575 read(6, "Name:\tat-spi2-registr\nUmask:\t002"..., 2048) = 1143 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1857/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/lib/at-spi2-registryd\0--use"..., 131072) = 47 +101575 read(6, "", 131025) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/1860", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/1860/stat", O_RDONLY) = 6 +101575 read(6, "1860 (spotify) S 1826 1779 1779 "..., 2048) = 286 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1860/status", O_RDONLY) = 6 +101575 read(6, "Name:\tspotify\nUmask:\t0022\nState:"..., 2048) = 1132 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1860/cmdline", O_RDONLY) = 6 +101575 read(6, "/opt/spotify/spotify --type=util"..., 131072) = 417 +101575 read(6, "", 130655) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/1871", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/1871/stat", O_RDONLY) = 6 +101575 read(6, "1871 (spotify) S 1821 1779 1779 "..., 2048) = 290 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1871/status", O_RDONLY) = 6 +101575 read(6, "Name:\tspotify\nUmask:\t0022\nState:"..., 2048) = 1133 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1871/cmdline", O_RDONLY) = 6 +101575 read(6, "/opt/spotify/spotify --type=util"..., 131072) = 414 +101575 read(6, "", 130658) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/1904", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/1904/stat", O_RDONLY) = 6 +101575 read(6, "1904 (spotify) S 1826 1779 1779 "..., 2048) = 305 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1904/status", O_RDONLY) = 6 +101575 read(6, "Name:\tspotify\nUmask:\t0022\nState:"..., 2048) = 1142 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1904/cmdline", O_RDONLY) = 6 +101575 read(6, "/opt/spotify/spotify --type=rend"..., 131072) = 438 +101575 read(6, "", 130634) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/1946", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/1946/stat", O_RDONLY) = 6 +101575 read(6, "1946 (signal-desktop) S 1677 164"..., 2048) = 323 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1946/status", O_RDONLY) = 6 +101575 read(6, "Name:\tsignal-desktop\nUmask:\t0077"..., 2048) = 1142 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/1946/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/lib/signal-desktop/signal-d"..., 131072) = 362 +101575 read(6, "", 130710) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/7732", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/7732/stat", O_RDONLY) = 6 +101575 read(6, "7732 (kworker/4:0-events_freezab"..., 2048) = 181 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/7732/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/4:0-events_freezab"..., 2048) = 759 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/7732/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/12839", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/12839/stat", O_RDONLY) = 6 +101575 read(6, "12839 (upowerd) S 1 12839 12839 "..., 2048) = 177 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/12839/status", O_RDONLY) = 6 +101575 read(6, "Name:\tupowerd\nUmask:\t0022\nState:"..., 2048) = 1120 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/12839/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/lib/upowerd\0", 131072) = 17 +101575 read(6, "", 131055) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/15837", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/15837/stat", O_RDONLY) = 6 +101575 read(6, "15837 (kworker/3:0-events) I 2 0"..., 2048) = 172 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/15837/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/3:0-events\nUmask:\t"..., 2048) = 751 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/15837/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/16987", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/16987/stat", O_RDONLY) = 6 +101575 read(6, "16987 (okular) S 1 16962 16962 0"..., 2048) = 338 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/16987/status", O_RDONLY) = 6 +101575 read(6, "Name:\tokular\nUmask:\t0022\nState:\t"..., 2048) = 1140 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/16987/cmdline", O_RDONLY) = 6 +101575 read(6, "okular\0", 131072) = 7 +101575 read(6, "", 131065) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/24785", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/24785/stat", O_RDONLY) = 6 +101575 read(6, "24785 (kworker/2:0-mm_percpu_wq)"..., 2048) = 177 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/24785/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/2:0-mm_percpu_wq\nU"..., 2048) = 759 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/24785/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/25396", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/25396/stat", O_RDONLY) = 6 +101575 read(6, "25396 (kworker/6:0-events) I 2 0"..., 2048) = 171 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/25396/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/6:0-events\nUmask:\t"..., 2048) = 752 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/25396/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/25397", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/25397/stat", O_RDONLY) = 6 +101575 read(6, "25397 (kworker/4:1-events) I 2 0"..., 2048) = 171 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/25397/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/4:1-events\nUmask:\t"..., 2048) = 752 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/25397/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 write(1, "al-desktop/signal-desktop --type"..., 4096) = 4096 +101576 <... read resumed>"al-desktop/signal-desktop --type"..., 86016) = 4096 +101575 newfstatat(AT_FDCWD, "/proc/25401", +101576 write(1, "root 153 2 0 17:2"..., 4096 +101575 <... newfstatat resumed>{st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101576 <... write resumed>) = 4096 +101575 openat(AT_FDCWD, "/proc/25401/stat", O_RDONLY +101577 <... read resumed>"root 153 2 0 17:2"..., 16320) = 4096 +101576 read(0, +101577 read(0, +101575 <... openat resumed>) = 6 +101575 read(6, "25401 (kworker/5:0-events) I 2 0"..., 2048) = 173 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/25401/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/5:0-events\nUmask:\t"..., 2048) = 756 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/25401/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/26035", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/26035/stat", O_RDONLY) = 6 +101575 read(6, "26035 (kded5) S 610 632 632 0 -1"..., 2048) = 314 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/26035/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkded5\nUmask:\t0022\nState:\tS"..., 2048) = 1135 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/26035/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/bin/kded5\0", 131072) = 15 +101575 read(6, "", 131057) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/28043", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/28043/stat", O_RDONLY) = 6 +101575 read(6, "28043 (GeckoMain) S 1 28018 2801"..., 2048) = 353 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/28043/status", O_RDONLY) = 6 +101575 read(6, "Name:\tGeckoMain\nUmask:\t0022\nStat"..., 2048) = 1148 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/28043/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/lib/firefox/firefox\0", 131072) = 25 +101575 read(6, "", 131047) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/28112", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/28112/stat", O_RDONLY) = 6 +101575 read(6, "28112 (Socket Process) S 28043 2"..., 2048) = 331 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/28112/status", O_RDONLY) = 6 +101575 read(6, "Name:\tSocket Process\nUmask:\t0022"..., 2048) = 1157 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/28112/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/lib/firefox/firefox\0-conten"..., 131072) = 151 +101575 read(6, "", 130921) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/28142", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/28142/stat", O_RDONLY) = 6 +101575 read(6, "28142 (Privileged Cont) S 28043 "..., 2048) = 341 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/28142/status", O_RDONLY) = 6 +101575 read(6, "Name:\tPrivileged Cont\nUmask:\t002"..., 2048) = 1165 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/28142/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/lib/firefox/firefox\0-conten"..., 131072) = 190 +101575 read(6, "", 130882) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/28215", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/28215/stat", O_RDONLY) = 6 +101575 read(6, "28215 (WebExtensions) S 28043 28"..., 2048) = 337 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/28215/status", O_RDONLY) = 6 +101575 read(6, "Name:\tWebExtensions\nUmask:\t0022\n"..., 2048) = 1163 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/28215/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/lib/firefox/firefox\0-conten"..., 131072) = 191 +101575 read(6, "", 130881) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/28263", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/28263/stat", O_RDONLY) = 6 +101575 read(6, "28263 (Web Content) S 28043 2801"..., 2048) = 346 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/28263/status", O_RDONLY) = 6 +101575 read(6, "Name:\tWeb Content\nUmask:\t0022\nSt"..., 2048) = 1163 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/28263/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/lib/firefox/firefox\0-conten"..., 131072) = 191 +101575 read(6, "", 130881) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/28270", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/28270/stat", O_RDONLY) = 6 +101575 read(6, "28270 (bash) S 28043 28018 28018"..., 2048) = 315 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/28270/status", O_RDONLY) = 6 +101575 read(6, "Name:\tbash\nUmask:\t0022\nState:\tS "..., 2048) = 1135 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/28270/cmdline", O_RDONLY) = 6 +101575 read(6, "bash\0/home/framal/.local/lib/pyt"..., 131072) = 155 +101575 read(6, "", 130917) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/28275", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/28275/stat", O_RDONLY) = 6 +101575 read(6, "28275 (python) S 28270 28018 280"..., 2048) = 315 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/28275/status", O_RDONLY) = 6 +101575 read(6, "Name:\tpython\nUmask:\t0022\nState:\t"..., 2048) = 1137 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/28275/cmdline", O_RDONLY) = 6 +101575 read(6, "python\0-m\0pywalfox\0start\0", 131072) = 25 +101575 read(6, "", 131047) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/39356", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/39356/stat", O_RDONLY) = 6 +101575 read(6, "39356 (kworker/2:1-events) I 2 0"..., 2048) = 170 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/39356/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/2:1-events\nUmask:\t"..., 2048) = 750 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/39356/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/45266", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/45266/stat", O_RDONLY) = 6 +101575 read(6, "45266 (spectacle) S 1 45265 4526"..., 2048) = 316 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/45266/status", O_RDONLY) = 6 +101575 read(6, "Name:\tspectacle\nUmask:\t0022\nStat"..., 2048) = 1141 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/45266/cmdline", O_RDONLY) = 6 +101575 read(6, "spectacle\0-brc\0", 131072) = 15 +101575 read(6, "", 131057) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/45269", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/45269/stat", O_RDONLY) = 6 +101575 read(6, "45269 (kglobalaccel5) S 610 4526"..., 2048) = 322 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/45269/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkglobalaccel5\nUmask:\t0022\n"..., 2048) = 1147 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/45269/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/bin/kglobalaccel5\0", 131072) = 23 +101575 read(6, "", 131049) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/45456", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/45456/stat", O_RDONLY) = 6 +101575 read(6, "45456 (dconf-service) S 610 4545"..., 2048) = 320 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/45456/status", O_RDONLY) = 6 +101575 read(6, "Name:\tdconf-service\nUmask:\t0022\n"..., 2048) = 1142 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/45456/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/lib/dconf-service\0", 131072) = 23 +101575 read(6, "", 131049) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/49809", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/49809/stat", O_RDONLY) = 6 +101575 read(6, "49809 (urxvt) S 1 49808 49808 0 "..., 2048) = 312 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/49809/status", O_RDONLY) = 6 +101575 read(6, "Name:\turxvt\nUmask:\t0022\nState:\tS"..., 2048) = 1136 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/49809/cmdline", O_RDONLY) = 6 +101575 read(6, "urxvt\0", 131072) = 6 +101575 read(6, "", 131066) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/49810", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/49810/stat", O_RDONLY) = 6 +101575 read(6, "49810 (zsh) S 49809 49810 49810 "..., 2048) = 330 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/49810/status", O_RDONLY) = 6 +101575 read(6, "Name:\tzsh\nUmask:\t0022\nState:\tS ("..., 2048) = 1134 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/49810/cmdline", O_RDONLY) = 6 +101575 read(6, "zsh\0", 131072) = 4 +101575 read(6, "", 131068) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/dev/pts1", 0x7ffd9e0685e0, 0) = -1 ENOENT (No such file or directory) +101575 newfstatat(AT_FDCWD, "/dev/pts/1", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x1), ...}, 0) = 0 +101575 newfstatat(AT_FDCWD, "/proc/52141", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/52141/stat", O_RDONLY) = 6 +101575 read(6, "52141 (RDD Process) S 28043 2801"..., 2048) = 338 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/52141/status", O_RDONLY) = 6 +101575 read(6, "Name:\tRDD Process\nUmask:\t0022\nSt"..., 2048) = 1157 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/52141/cmdline", O_RDONLY) = 6 +101575 read(6, "/usr/lib/firefox/firefox\0-conten"..., 131072) = 151 +101575 read(6, "", 130921) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/64050", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/64050/stat", O_RDONLY) = 6 +101575 read(6, "64050 (kworker/7:2-events) I 2 0"..., 2048) = 172 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/64050/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/7:2-events\nUmask:\t"..., 2048) = 751 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/64050/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/64396", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/64396/stat", O_RDONLY) = 6 +101575 read(6, "64396 (urxvt) S 1 64395 64395 0 "..., 2048) = 314 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/64396/status", O_RDONLY) = 6 +101575 read(6, "Name:\turxvt\nUmask:\t0022\nState:\tS"..., 2048) = 1137 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/64396/cmdline", O_RDONLY) = 6 +101575 read(6, "urxvt\0", 131072) = 6 +101575 read(6, "", 131066) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/64397", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/64397/stat", O_RDONLY) = 6 +101575 read(6, "64397 (zsh) S 64396 64397 64397 "..., 2048) = 344 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/64397/status", O_RDONLY) = 6 +101575 read(6, "Name:\tzsh\nUmask:\t0022\nState:\tS ("..., 2048) = 1138 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/64397/cmdline", O_RDONLY) = 6 +101575 read(6, "zsh\0", 131072) = 4 +101575 read(6, "", 131068) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/dev/pts3", 0x7ffd9e0685e0, 0) = -1 ENOENT (No such file or directory) +101575 newfstatat(AT_FDCWD, "/dev/pts/3", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x3), ...}, 0) = 0 +101575 newfstatat(AT_FDCWD, "/proc/65012", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/65012/stat", O_RDONLY) = 6 +101575 read(6, "65012 (kworker/u16:6-events_unbo"..., 2048) = 184 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/65012/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/u16:6-events_unbou"..., 2048) = 769 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/65012/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/66339", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/66339/stat", O_RDONLY) = 6 +101575 read(6, "66339 (sublime_text) R 1 66337 6"..., 2048) = 311 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/66339/status", O_RDONLY) = 6 +101575 read(6, "Name:\tsublime_text\nUmask:\t0022\nS"..., 2048) = 1149 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/66339/cmdline", O_RDONLY) = 6 +101575 read(6, "subl\0--detached\0.\0", 131072) = 18 +101575 read(6, "", 131054) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/dev/pts3", 0x7ffd9e0685e0, 0) = -1 ENOENT (No such file or directory) +101575 newfstatat(AT_FDCWD, "/dev/pts/3", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x3), ...}, 0) = 0 +101575 newfstatat(AT_FDCWD, "/proc/66498", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/66498/stat", O_RDONLY) = 6 +101575 read(6, "66498 (plugin_host-3.3) S 66339 "..., 2048) = 309 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/66498/status", O_RDONLY) = 6 +101575 read(6, "Name:\tplugin_host-3.3\nUmask:\t002"..., 2048) = 1150 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/66498/cmdline", O_RDONLY) = 6 +101575 read(6, "/opt/sublime_text/plugin_host-3."..., 131072) = 165 +101575 read(6, "", 130907) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/dev/pts3", 0x7ffd9e0685e0, 0) = -1 ENOENT (No such file or directory) +101575 newfstatat(AT_FDCWD, "/dev/pts/3", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x3), ...}, 0) = 0 +101575 newfstatat(AT_FDCWD, "/proc/66501", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/66501/stat", O_RDONLY) = 6 +101575 read(6, "66501 (plugin_host-3.8) S 66339 "..., 2048) = 314 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/66501/status", O_RDONLY) = 6 +101575 read(6, "Name:\tplugin_host-3.8\nUmask:\t002"..., 2048) = 1151 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/66501/cmdline", O_RDONLY) = 6 +101575 read(6, "/opt/sublime_text/plugin_host-3."..., 131072) = 165 +101575 read(6, "", 130907) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/dev/pts3", 0x7ffd9e0685e0, 0) = -1 ENOENT (No such file or directory) +101575 newfstatat(AT_FDCWD, "/dev/pts/3", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x3), ...}, 0) = 0 +101575 newfstatat(AT_FDCWD, "/proc/72138", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/72138/stat", O_RDONLY) = 6 +101575 read(6, "72138 (kworker/u17:2-hci0) I 2 0"..., 2048) = 175 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/72138/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/u17:2-hci0\nUmask:\t"..., 2048) = 755 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/72138/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/73874", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/73874/stat", O_RDONLY) = 6 +101575 read(6, "73874 (urxvt) S 1 73873 73873 0 "..., 2048) = 313 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/73874/status", O_RDONLY) = 6 +101575 read(6, "Name:\turxvt\nUmask:\t0022\nState:\tS"..., 2048) = 1135 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/73874/cmdline", O_RDONLY) = 6 +101575 read(6, "urxvt\0", 131072) = 6 +101575 read(6, "", 131066) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/73875", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/73875/stat", O_RDONLY) = 6 +101575 read(6, "73875 (zsh) S 73874 73875 73875 "..., 2048) = 337 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/73875/status", O_RDONLY) = 6 +101575 read(6, "Name:\tzsh\nUmask:\t0022\nState:\tS ("..., 2048) = 1136 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/73875/cmdline", O_RDONLY) = 6 +101575 read(6, "zsh\0", 131072) = 4 +101575 read(6, "", 131068) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/dev/pts0", 0x7ffd9e0685e0, 0) = -1 ENOENT (No such file or directory) +101575 newfstatat(AT_FDCWD, "/dev/pts/0", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0), ...}, 0) = 0 +101575 newfstatat(AT_FDCWD, "/proc/75704", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/75704/stat", O_RDONLY) = 6 +101575 read(6, "75704 (kworker/u17:0-hci0) I 2 0"..., 2048) = 175 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/75704/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/u17:0-hci0\nUmask:\t"..., 2048) = 755 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/75704/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/82020", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/82020/stat", O_RDONLY) = 6 +101575 read(6, "82020 (urxvt) S 1 82019 82019 0 "..., 2048) = 313 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/82020/status", O_RDONLY) = 6 +101575 read(6, "Name:\turxvt\nUmask:\t0022\nState:\tS"..., 2048) = 1136 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/82020/cmdline", O_RDONLY) = 6 +101575 read(6, "urxvt\0", 131072) = 6 +101575 read(6, "", 131066) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/82021", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/82021/stat", O_RDONLY) = 6 +101575 read(6, "82021 (zsh) S 82020 82021 82021 "..., 2048) = 338 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/82021/status", O_RDONLY) = 6 +101575 read(6, "Name:\tzsh\nUmask:\t0022\nState:\tS ("..., 2048) = 1136 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/82021/cmdline", O_RDONLY) = 6 +101575 read(6, "zsh\0", 131072) = 4 +101575 read(6, "", 131068) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/dev/pts2", 0x7ffd9e0685e0, 0) = -1 ENOENT (No such file or directory) +101575 newfstatat(AT_FDCWD, "/dev/pts/2", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x2), ...}, 0) = 0 +101575 newfstatat(AT_FDCWD, "/proc/87358", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/87358/stat", O_RDONLY) = 6 +101575 read(6, "87358 (kworker/0:1-events) I 2 0"..., 2048) = 172 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/87358/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/0:1-events\nUmask:\t"..., 2048) = 750 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/87358/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/94760", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/94760/stat", O_RDONLY) = 6 +101575 read(6, "94760 (kworker/u17:1-hci0) I 2 0"..., 2048) = 174 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/94760/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/u17:1-hci0\nUmask:\t"..., 2048) = 754 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/94760/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/95204", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/95204/stat", O_RDONLY) = 6 +101575 read(6, "95204 (kworker/6:2-inet_frag_wq)"..., 2048) = 177 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/95204/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/6:2-inet_frag_wq\nU"..., 2048) = 756 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/95204/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/95369", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/95369/stat", O_RDONLY) = 6 +101575 read(6, "95369 (kworker/u16:1-i915) I 2 0"..., 2048) = 173 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/95369/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/u16:1-i915\nUmask:\t"..., 2048) = 755 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/95369/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/96396", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/96396/stat", O_RDONLY) = 6 +101575 read(6, "96396 (kworker/3:1-events) I 2 0"..., 2048) = 171 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/96396/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/3:1-events\nUmask:\t"..., 2048) = 748 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/96396/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/96397", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/96397/stat", O_RDONLY) = 6 +101575 read(6, "96397 (kworker/1:2-mm_percpu_wq)"..., 2048) = 177 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/96397/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/1:2-mm_percpu_wq\nU"..., 2048) = 756 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/96397/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/96398", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/96398/stat", O_RDONLY) = 6 +101575 read(6, "96398 (kworker/5:2-events) I 2 0"..., 2048) = 171 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/96398/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/5:2-events\nUmask:\t"..., 2048) = 751 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/96398/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/96405", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/96405/stat", O_RDONLY) = 6 +101575 read(6, "96405 (kworker/0:0-events) I 2 0"..., 2048) = 171 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/96405/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/0:0-events\nUmask:\t"..., 2048) = 750 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/96405/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/98479", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/98479/stat", O_RDONLY) = 6 +101575 read(6, "98479 (kworker/u16:2-flush-8:0) "..., 2048) = 177 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/98479/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/u16:2-flush-8:0\nUm"..., 2048) = 758 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/98479/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/99974", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/99974/stat", O_RDONLY) = 6 +101575 read(6, "99974 (kworker/u16:0-events_unbo"..., 2048) = 182 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/99974/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/u16:0-events_unbou"..., 2048) = 763 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/99974/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/100308", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/100308/stat", O_RDONLY) = 6 +101575 read(6, "100308 (kworker/7:1) I 2 0 0 0 -"..., 2048) = 165 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/100308/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/7:1\nUmask:\t0000\nSt"..., 2048) = 744 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/100308/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/100726", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/100726/stat", O_RDONLY) = 6 +101575 read(6, "100726 (kworker/u16:3-i915) I 2 "..., 2048) = 173 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/100726/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/u16:3-i915\nUmask:\t"..., 2048) = 757 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/100726/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 write(1, " 0 18:40 ? 00:00:00 [kwor"..., 4096) = 4096 +101576 <... read resumed>" 0 18:40 ? 00:00:00 [kwor"..., 81920) = 4096 +101575 newfstatat(AT_FDCWD, "/proc/100976", +101576 read(0, +101575 <... newfstatat resumed>{st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/100976/stat", O_RDONLY) = 6 +101575 read(6, "100976 (kworker/5:1) I 2 0 0 0 -"..., 2048) = 165 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/100976/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/5:1\nUmask:\t0000\nSt"..., 2048) = 744 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/100976/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/101167", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/101167/stat", O_RDONLY) = 6 +101575 read(6, "101167 (kworker/3:2) I 2 0 0 0 -"..., 2048) = 165 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/101167/status", O_RDONLY) = 6 +101575 read(6, "Name:\tkworker/3:2\nUmask:\t0000\nSt"..., 2048) = 744 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/101167/cmdline", O_RDONLY) = 6 +101575 read(6, "", 131072) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/proc/101510", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/101510/stat", O_RDONLY) = 6 +101575 read(6, "101510 (strace) S 64397 101510 6"..., 2048) = 329 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/101510/status", O_RDONLY) = 6 +101575 read(6, "Name:\tstrace\nUmask:\t0022\nState:\t"..., 2048) = 1144 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/101510/cmdline", O_RDONLY) = 6 +101575 read(6, "strace\0-o\0pipeline2.log\0-f\0dash\0", 131072) = 32 +101575 read(6, "", 131040) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/dev/pts3", 0x7ffd9e0685e0, 0) = -1 ENOENT (No such file or directory) +101575 newfstatat(AT_FDCWD, "/dev/pts/3", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x3), ...}, 0) = 0 +101575 newfstatat(AT_FDCWD, "/proc/DASH", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/DASH/stat", O_RDONLY) = 6 +101575 read(6, "DASH (dash) S 101510 DASH 64"..., 2048) = 325 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/DASH/status", O_RDONLY) = 6 +101575 read(6, "Name:\tdash\nUmask:\t0022\nState:\tS "..., 2048) = 1147 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/DASH/cmdline", O_RDONLY) = 6 +101575 read(6, "dash\0", 131072) = 5 +101575 read(6, "", 131067) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/dev/pts3", 0x7ffd9e0685e0, 0) = -1 ENOENT (No such file or directory) +101575 newfstatat(AT_FDCWD, "/dev/pts/3", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x3), ...}, 0) = 0 +101575 newfstatat(AT_FDCWD, "/proc/101575", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/101575/stat", O_RDONLY) = 6 +101575 read(6, "101575 (ps) R DASH 101575 6439"..., 2048) = 323 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/101575/status", O_RDONLY) = 6 +101575 read(6, "Name:\tps\nUmask:\t0022\nState:\tR (r"..., 2048) = 1145 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/101575/cmdline", O_RDONLY) = 6 +101575 read(6, "ps\0-ef\0", 131072) = 7 +101575 read(6, "", 131065) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/dev/pts3", 0x7ffd9e0685e0, 0) = -1 ENOENT (No such file or directory) +101575 newfstatat(AT_FDCWD, "/dev/pts/3", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x3), ...}, 0) = 0 +101575 newfstatat(AT_FDCWD, "/proc/101576", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/101576/stat", O_RDONLY) = 6 +101575 read(6, "101576 (grep) S DASH 101575 64"..., 2048) = 318 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/101576/status", O_RDONLY) = 6 +101575 read(6, "Name:\tgrep\nUmask:\t0022\nState:\tS "..., 2048) = 1147 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/101576/cmdline", O_RDONLY) = 6 +101575 read(6, "grep\0sh\0", 131072) = 8 +101575 read(6, "", 131064) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/dev/pts3", 0x7ffd9e0685e0, 0) = -1 ENOENT (No such file or directory) +101575 newfstatat(AT_FDCWD, "/dev/pts/3", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x3), ...}, 0) = 0 +101575 newfstatat(AT_FDCWD, "/proc/101577", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) = 0 +101575 openat(AT_FDCWD, "/proc/101577/stat", O_RDONLY) = 6 +101575 read(6, "101577 (wc) S DASH 101575 6439"..., 2048) = 312 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/101577/status", O_RDONLY) = 6 +101575 read(6, "Name:\twc\nUmask:\t0022\nState:\tS (s"..., 2048) = 1145 +101575 close(6) = 0 +101575 openat(AT_FDCWD, "/proc/101577/cmdline", O_RDONLY) = 6 +101575 read(6, "wc\0-l\0", 131072) = 6 +101575 read(6, "", 131066) = 0 +101575 close(6) = 0 +101575 newfstatat(AT_FDCWD, "/dev/pts3", 0x7ffd9e0685e0, 0) = -1 ENOENT (No such file or directory) +101575 newfstatat(AT_FDCWD, "/dev/pts/3", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x3), ...}, 0) = 0 +101575 getdents64(5, 0x55ec68e3c0c0 /* 0 entries */, 32768) = 0 +101575 close(5) = 0 +101575 write(1, " 00:00:00 [kworker/u16:3-i91"..., 485) = 485 +101576 <... read resumed>" 00:00:00 [kworker/u16:3-i91"..., 77824) = 485 +101575 close(1 +101576 read(0, +101575 <... close resumed>) = 0 +101576 <... read resumed>"", 77824) = 0 +101575 close(2 +101576 write(1, "faultCookies,SpareRendererForSit"..., 839 +101575 <... close resumed>) = 0 +101576 <... write resumed>) = 839 +101576 close(1 +101577 <... read resumed>"faultCookies,SpareRendererForSit"..., 16320) = 839 +101576 <... close resumed>) = 0 +101575 exit_group(0 +101576 close(2 +101575 <... exit_group resumed>) = ? +101576 <... close resumed>) = 0 +101577 read(0, +101576 exit_group(0) = ? +101577 <... read resumed>"", 16320) = 0 +101577 newfstatat(1, "", {st_mode=S_IFREG|0644, st_size=0, ...}, AT_EMPTY_PATH) = 0 +101576 +++ exited with 0 +++ +101575 +++ exited with 0 +++ +DASH <... wait4 resumed>[{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WSTOPPED, NULL) = 101575 +101577 write(1, "21\n", 3 +DASH --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=101576, si_uid=1000, si_status=0, si_utime=0, si_stime=0} --- +DASH rt_sigreturn({mask=[]}) = 101575 +101577 <... write resumed>) = 3 +DASH wait4(-1, +101577 close(0 +DASH <... wait4 resumed>[{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WSTOPPED, NULL) = 101576 +101577 <... close resumed>) = 0 +DASH wait4(-1, +101577 close(1) = 0 +101577 close(2) = 0 +101577 exit_group(0) = ? +101577 +++ exited with 0 +++ +DASH <... wait4 resumed>[{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WSTOPPED, NULL) = 101577 +DASH --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=101577, si_uid=1000, si_status=0, si_utime=0, si_stime=0} --- +DASH rt_sigreturn({mask=[]}) = 101577 +DASH wait4(-1, 0x7ffe0e73ae9c, WNOHANG|WSTOPPED, NULL) = -1 ECHILD (No child processes) +DASH ioctl(10, TIOCSPGRP, [DASH]) = 0 +DASH newfstatat(AT_FDCWD, "/var/spool/mail/framal", 0x7ffe0e73afd0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/frama", 0x7ffe0e73afd0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/fram", 0x7ffe0e73afd0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/fra", 0x7ffe0e73afd0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/fr", 0x7ffe0e73afd0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/f", 0x7ffe0e73afd0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}, 0) = 0 +DASH newfstatat(AT_FDCWD, "/var/spool/mail", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}, 0) = 0 +DASH newfstatat(AT_FDCWD, "/var/spool/mai", 0x7ffe0e73afd0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/ma", 0x7ffe0e73afd0, 0) = -1 ENOENT (No such file or directory) +DASH write(2, "$ ", 2) = 2 +DASH read(0, "echo $?\n", 8192) = 8 +DASH write(1, "0\n", 2) = 2 +DASH newfstatat(AT_FDCWD, "/var/spool/mail/framal", 0x7ffe0e73afd0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/frama", 0x7ffe0e73afd0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/fram", 0x7ffe0e73afd0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/fra", 0x7ffe0e73afd0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/fr", 0x7ffe0e73afd0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/f", 0x7ffe0e73afd0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/mail/", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}, 0) = 0 +DASH newfstatat(AT_FDCWD, "/var/spool/mail", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}, 0) = 0 +DASH newfstatat(AT_FDCWD, "/var/spool/mai", 0x7ffe0e73afd0, 0) = -1 ENOENT (No such file or directory) +DASH newfstatat(AT_FDCWD, "/var/spool/ma", 0x7ffe0e73afd0, 0) = -1 ENOENT (No such file or directory) +DASH write(2, "$ ", 2) = 2 +DASH read(0, "exit 42\n", 8192) = 8 +DASH ioctl(10, TIOCSPGRP, [101510]) = 0 +DASH setpgid(0, 101510) = 0 +DASH close(10) = 0 +DASH exit_group(42) = ? +DASH +++ exited with 42 +++ diff --git a/semestr-5/so/lista4/pipeline3.log b/semestr-5/so/lista4/pipeline3.log new file mode 100644 index 0000000..716874f --- /dev/null +++ b/semestr-5/so/lista4/pipeline3.log @@ -0,0 +1,249 @@ +103647 execve("/usr/bin/dash", ["dash"], 0x7ffcdfc7bbd8 /* 40 vars */) = 0 +103647 brk(NULL) = 0x55dfe7c3c000 +103647 arch_prctl(0x3001 /* ARCH_??? */, 0x7ffd24410fd0) = -1 EINVAL (Invalid argument) +103647 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) +103647 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 +103647 newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=92088, ...}, AT_EMPTY_PATH) = 0 +103647 mmap(NULL, 92088, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f42c0819000 +103647 close(3) = 0 +103647 openat(AT_FDCWD, "/usr/lib/libedit.so.0", O_RDONLY|O_CLOEXEC) = 3 +103647 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \220\0\0\0\0\0\0"..., 832) = 832 +103647 newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=223144, ...}, AT_EMPTY_PATH) = 0 +103647 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f42c0817000 +103647 mmap(NULL, 240792, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f42c07dc000 +103647 mprotect(0x7f42c07e5000, 180224, PROT_NONE) = 0 +103647 mmap(0x7f42c07e5000, 118784, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9000) = 0x7f42c07e5000 +103647 mmap(0x7f42c0802000, 57344, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f42c0802000 +103647 mmap(0x7f42c0811000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x34000) = 0x7f42c0811000 +103647 mmap(0x7f42c0814000, 11416, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f42c0814000 +103647 close(3) = 0 +103647 openat(AT_FDCWD, "/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 +103647 read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`|\2\0\0\0\0\0"..., 832) = 832 +103647 pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784 +103647 pread64(3, "\4\0\0\0@\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0"..., 80, 848) = 80 +103647 pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0K@g7\5w\10\300\344\306B4Zp\0\1\0\0\0 p\1\0\0\0\0\0"..., 832) = 832 +103647 newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=453688, ...}, AT_EMPTY_PATH) = 0 +103647 mmap(NULL, 457976, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f42c05a0000 +103647 mmap(0x7f42c05b7000, 241664, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7f42c05b7000 +103647 mmap(0x7f42c05f2000, 98304, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x52000) = 0x7f42c05f2000 +103647 mmap(0x7f42c060a000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x69000) = 0x7f42c060a000 +103647 close(3) = 0 +103647 mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f42c059d000 +103647 arch_prctl(ARCH_SET_FS, 0x7f42c059d740) = 0 +103647 mprotect(0x7f42c07cd000, 12288, PROT_READ) = 0 +103647 mprotect(0x7f42c060a000, 20480, PROT_READ) = 0 +103647 mprotect(0x7f42c0811000, 8192, PROT_READ) = 0 +103647 mprotect(0x55dfe75e9000, 8192, PROT_READ) = 0 +103647 mprotect(0x7f42c085e000, 8192, PROT_READ) = 0 +103647 munmap(0x7f42c0819000, 92088) = 0 +103647 getpid() = 103647 +103647 rt_sigaction(SIGCHLD, {sa_handler=0x55dfe75ded40, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f42c064cda0}, NULL, 8) = 0 +103647 geteuid() = 1000 +103647 brk(NULL) = 0x55dfe7c3c000 +103647 brk(0x55dfe7c5d000) = 0x55dfe7c5d000 +103647 getppid() = 103644 +103647 newfstatat(AT_FDCWD, "/home/framal", {st_mode=S_IFDIR|0700, st_size=4096, ...}, 0) = 0 +103647 newfstatat(AT_FDCWD, ".", {st_mode=S_IFDIR|0700, st_size=4096, ...}, 0) = 0 +103647 ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0 +103647 ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0 +103647 rt_sigaction(SIGINT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 +103647 rt_sigaction(SIGINT, {sa_handler=0x55dfe75ded40, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f42c064cda0}, NULL, 8) = 0 +103647 rt_sigaction(SIGQUIT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 +103647 rt_sigaction(SIGQUIT, {sa_handler=SIG_IGN, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f42c064cda0}, NULL, 8) = 0 +103647 rt_sigaction(SIGTERM, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 +103647 rt_sigaction(SIGTERM, {sa_handler=SIG_IGN, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f42c064cda0}, NULL, 8) = 0 +103647 openat(AT_FDCWD, "/dev/tty", O_RDWR) = 3 +103647 fcntl(3, F_DUPFD, 10) = 10 +103647 close(3) = 0 +103647 fcntl(10, F_SETFD, FD_CLOEXEC) = 0 +103647 ioctl(10, TIOCGPGRP, [103644]) = 0 +103647 getpgrp() = 103644 +103647 rt_sigaction(SIGTSTP, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 +103647 rt_sigaction(SIGTSTP, {sa_handler=SIG_IGN, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f42c064cda0}, NULL, 8) = 0 +103647 rt_sigaction(SIGTTOU, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 +103647 rt_sigaction(SIGTTOU, {sa_handler=SIG_IGN, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f42c064cda0}, NULL, 8) = 0 +103647 rt_sigaction(SIGTTIN, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 +103647 rt_sigaction(SIGTTIN, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f42c064cda0}, NULL, 8) = 0 +103647 setpgid(0, 103647) = 0 +103647 ioctl(10, TIOCSPGRP, [103647]) = 0 +103647 newfstatat(AT_FDCWD, "/var/spool/mail/framal", 0x7ffd24410eb0, 0) = -1 ENOENT (No such file or directory) +103647 newfstatat(AT_FDCWD, "/var/spool/mail/frama", 0x7ffd24410eb0, 0) = -1 ENOENT (No such file or directory) +103647 newfstatat(AT_FDCWD, "/var/spool/mail/fram", 0x7ffd24410eb0, 0) = -1 ENOENT (No such file or directory) +103647 newfstatat(AT_FDCWD, "/var/spool/mail/fra", 0x7ffd24410eb0, 0) = -1 ENOENT (No such file or directory) +103647 newfstatat(AT_FDCWD, "/var/spool/mail/fr", 0x7ffd24410eb0, 0) = -1 ENOENT (No such file or directory) +103647 newfstatat(AT_FDCWD, "/var/spool/mail/f", 0x7ffd24410eb0, 0) = -1 ENOENT (No such file or directory) +103647 newfstatat(AT_FDCWD, "/var/spool/mail/", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}, 0) = 0 +103647 newfstatat(AT_FDCWD, "/var/spool/mail", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}, 0) = 0 +103647 newfstatat(AT_FDCWD, "/var/spool/mai", 0x7ffd24410eb0, 0) = -1 ENOENT (No such file or directory) +103647 newfstatat(AT_FDCWD, "/var/spool/ma", 0x7ffd24410eb0, 0) = -1 ENOENT (No such file or directory) +103647 write(2, "$ ", 2) = 2 +103647 read(0, "false | true\n", 8192) = 13 +103647 pipe([3, 4]) = 0 +103647 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f42c059da10) = 103651 +103651 getpid( +103647 setpgid(103651, 103651 +103651 <... getpid resumed>) = 103651 +103647 <... setpgid resumed>) = 0 +103647 close(4) = 0 +103651 setpgid(0, 103651 +103647 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD +103651 <... setpgid resumed>) = 0 +103651 ioctl(10, TIOCSPGRP, [103651]) = 0 +103651 rt_sigaction(SIGTSTP, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f42c064cda0}, +103647 <... clone resumed>, child_tidptr=0x7f42c059da10) = 103652 +103651 <... rt_sigaction resumed>NULL, 8) = 0 +103647 setpgid(103652, 103651 +103651 rt_sigaction(SIGTTOU, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f42c064cda0}, +103647 <... setpgid resumed>) = 0 +103651 <... rt_sigaction resumed>NULL, 8) = 0 +103647 close(3 +103651 rt_sigaction(SIGINT, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f42c064cda0}, +103647 <... close resumed>) = 0 +103651 <... rt_sigaction resumed>NULL, 8) = 0 +103647 close(-1 +103652 setpgid(0, 103651 +103651 rt_sigaction(SIGQUIT, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f42c064cda0}, +103647 <... close resumed>) = -1 EBADF (Bad file descriptor) +103652 <... setpgid resumed>) = 0 +103651 <... rt_sigaction resumed>NULL, 8) = 0 +103647 wait4(-1, +103652 ioctl(10, TIOCSPGRP, [103651] +103651 rt_sigaction(SIGTERM, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f42c064cda0}, +103652 <... ioctl resumed>) = 0 +103651 <... rt_sigaction resumed>NULL, 8) = 0 +103652 rt_sigaction(SIGTSTP, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f42c064cda0}, +103651 close(3 +103652 <... rt_sigaction resumed>NULL, 8) = 0 +103651 <... close resumed>) = 0 +103652 rt_sigaction(SIGTTOU, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f42c064cda0}, +103651 dup2(4, 1 +103652 <... rt_sigaction resumed>NULL, 8) = 0 +103651 <... dup2 resumed>) = 1 +103652 rt_sigaction(SIGINT, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f42c064cda0}, +103651 close(4 +103652 <... rt_sigaction resumed>NULL, 8) = 0 +103651 <... close resumed>) = 0 +103652 rt_sigaction(SIGQUIT, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f42c064cda0}, NULL, 8) = 0 +103652 rt_sigaction(SIGTERM, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f42c064cda0}, +103651 exit_group(1 +103652 <... rt_sigaction resumed>NULL, 8) = 0 +103651 <... exit_group resumed>) = ? +103652 dup2(3, 0) = 0 +103652 close(3) = 0 +103651 +++ exited with 1 +++ +103647 <... wait4 resumed>[{WIFEXITED(s) && WEXITSTATUS(s) == 1}], WSTOPPED, NULL) = 103651 +103652 exit_group(0 +103647 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=103651, si_uid=1000, si_status=1, si_utime=0, si_stime=0} --- +103652 <... exit_group resumed>) = ? +103647 rt_sigreturn({mask=[]}) = 103651 +103647 wait4(-1, +103652 +++ exited with 0 +++ +103647 <... wait4 resumed>[{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WSTOPPED, NULL) = 103652 +103647 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=103652, si_uid=1000, si_status=0, si_utime=0, si_stime=0} --- +103647 rt_sigreturn({mask=[]}) = 103652 +103647 wait4(-1, 0x7ffd24410d7c, WNOHANG|WSTOPPED, NULL) = -1 ECHILD (No child processes) +103647 ioctl(10, TIOCSPGRP, [103647]) = 0 +103647 newfstatat(AT_FDCWD, "/var/spool/mail/framal", 0x7ffd24410eb0, 0) = -1 ENOENT (No such file or directory) +103647 newfstatat(AT_FDCWD, "/var/spool/mail/frama", 0x7ffd24410eb0, 0) = -1 ENOENT (No such file or directory) +103647 newfstatat(AT_FDCWD, "/var/spool/mail/fram", 0x7ffd24410eb0, 0) = -1 ENOENT (No such file or directory) +103647 newfstatat(AT_FDCWD, "/var/spool/mail/fra", 0x7ffd24410eb0, 0) = -1 ENOENT (No such file or directory) +103647 newfstatat(AT_FDCWD, "/var/spool/mail/fr", 0x7ffd24410eb0, 0) = -1 ENOENT (No such file or directory) +103647 newfstatat(AT_FDCWD, "/var/spool/mail/f", 0x7ffd24410eb0, 0) = -1 ENOENT (No such file or directory) +103647 newfstatat(AT_FDCWD, "/var/spool/mail/", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}, 0) = 0 +103647 newfstatat(AT_FDCWD, "/var/spool/mail", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}, 0) = 0 +103647 newfstatat(AT_FDCWD, "/var/spool/mai", 0x7ffd24410eb0, 0) = -1 ENOENT (No such file or directory) +103647 newfstatat(AT_FDCWD, "/var/spool/ma", 0x7ffd24410eb0, 0) = -1 ENOENT (No such file or directory) +103647 write(2, "$ ", 2) = 2 +103647 read(0, "true | false\n", 8192) = 13 +103647 pipe([3, 4]) = 0 +103647 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f42c059da10) = 103681 +103647 setpgid(103681, 103681 +103681 getpid( +103647 <... setpgid resumed>) = 0 +103647 close(4 +103681 <... getpid resumed>) = 103681 +103647 <... close resumed>) = 0 +103681 setpgid(0, 103681 +103647 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD +103681 <... setpgid resumed>) = 0 +103681 ioctl(10, TIOCSPGRP, [103681]) = 0 +103647 <... clone resumed>, child_tidptr=0x7f42c059da10) = 103682 +103647 setpgid(103682, 103681) = 0 +103681 rt_sigaction(SIGTSTP, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f42c064cda0}, +103682 setpgid(0, 103681 +103647 close(3) = 0 +103647 close(-1 +103681 <... rt_sigaction resumed>NULL, 8) = 0 +103647 <... close resumed>) = -1 EBADF (Bad file descriptor) +103682 <... setpgid resumed>) = 0 +103681 rt_sigaction(SIGTTOU, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f42c064cda0}, +103647 wait4(-1, +103681 <... rt_sigaction resumed>NULL, 8) = 0 +103681 rt_sigaction(SIGINT, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f42c064cda0}, +103682 ioctl(10, TIOCSPGRP, [103681] +103681 <... rt_sigaction resumed>NULL, 8) = 0 +103682 <... ioctl resumed>) = 0 +103681 rt_sigaction(SIGQUIT, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f42c064cda0}, +103682 rt_sigaction(SIGTSTP, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f42c064cda0}, +103681 <... rt_sigaction resumed>NULL, 8) = 0 +103682 <... rt_sigaction resumed>NULL, 8) = 0 +103681 rt_sigaction(SIGTERM, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f42c064cda0}, +103682 rt_sigaction(SIGTTOU, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f42c064cda0}, +103681 <... rt_sigaction resumed>NULL, 8) = 0 +103682 <... rt_sigaction resumed>NULL, 8) = 0 +103682 rt_sigaction(SIGINT, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f42c064cda0}, +103681 close(3 +103682 <... rt_sigaction resumed>NULL, 8) = 0 +103681 <... close resumed>) = 0 +103682 rt_sigaction(SIGQUIT, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f42c064cda0}, +103681 dup2(4, 1 +103682 <... rt_sigaction resumed>NULL, 8) = 0 +103681 <... dup2 resumed>) = 1 +103682 rt_sigaction(SIGTERM, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f42c064cda0}, +103681 close(4 +103682 <... rt_sigaction resumed>NULL, 8) = 0 +103681 <... close resumed>) = 0 +103682 dup2(3, 0) = 0 +103682 close(3 +103681 exit_group(0 +103682 <... close resumed>) = 0 +103681 <... exit_group resumed>) = ? +103682 exit_group(1) = ? +103681 +++ exited with 0 +++ +103647 <... wait4 resumed>[{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WSTOPPED, NULL) = 103681 +103647 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=103681, si_uid=1000, si_status=0, si_utime=0, si_stime=0} --- +103647 rt_sigreturn({mask=[]} +103682 +++ exited with 1 +++ +103647 <... rt_sigreturn resumed>) = 103681 +103647 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=103682, si_uid=1000, si_status=1, si_utime=0, si_stime=0} --- +103647 rt_sigreturn({mask=[]}) = 103681 +103647 wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], WSTOPPED, NULL) = 103682 +103647 wait4(-1, 0x7ffd24410d7c, WNOHANG|WSTOPPED, NULL) = -1 ECHILD (No child processes) +103647 ioctl(10, TIOCSPGRP, [103647]) = 0 +103647 newfstatat(AT_FDCWD, "/var/spool/mail/framal", 0x7ffd24410eb0, 0) = -1 ENOENT (No such file or directory) +103647 newfstatat(AT_FDCWD, "/var/spool/mail/frama", 0x7ffd24410eb0, 0) = -1 ENOENT (No such file or directory) +103647 newfstatat(AT_FDCWD, "/var/spool/mail/fram", 0x7ffd24410eb0, 0) = -1 ENOENT (No such file or directory) +103647 newfstatat(AT_FDCWD, "/var/spool/mail/fra", 0x7ffd24410eb0, 0) = -1 ENOENT (No such file or directory) +103647 newfstatat(AT_FDCWD, "/var/spool/mail/fr", 0x7ffd24410eb0, 0) = -1 ENOENT (No such file or directory) +103647 newfstatat(AT_FDCWD, "/var/spool/mail/f", 0x7ffd24410eb0, 0) = -1 ENOENT (No such file or directory) +103647 newfstatat(AT_FDCWD, "/var/spool/mail/", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}, 0) = 0 +103647 newfstatat(AT_FDCWD, "/var/spool/mail", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}, 0) = 0 +103647 newfstatat(AT_FDCWD, "/var/spool/mai", 0x7ffd24410eb0, 0) = -1 ENOENT (No such file or directory) +103647 newfstatat(AT_FDCWD, "/var/spool/ma", 0x7ffd24410eb0, 0) = -1 ENOENT (No such file or directory) +103647 write(2, "$ ", 2) = 2 +103647 read(0, "exit 42\n", 8192) = 8 +103647 ioctl(10, TIOCSPGRP, [103644]) = 0 +103647 setpgid(0, 103644) = 0 +103647 close(10) = 0 +103647 exit_group(42) = ? +103647 +++ exited with 42 +++ diff --git a/semestr-5/so/lista4/script.log b/semestr-5/so/lista4/script.log new file mode 100644 index 0000000..f504af0 --- /dev/null +++ b/semestr-5/so/lista4/script.log @@ -0,0 +1,428 @@ +76398 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\23\0\0\0\0\0\0"..., 832) = 832 +76398 read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`|\2\0\0\0\0\0"..., 832) = 832 +76398 read(3, "# Locale name alias data base.\n#"..., 4096) = 2998 +76398 read(3, "", 4096) = 0 +76398 write(1, "Script started, output log file "..., 74) = 74 +76398 read(7, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\v\0\0\0\v\0\0\0\0"..., 4096) = 2654 +76398 read(7, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\v\0\0\0\v\0\0\0\0"..., 4096) = 1671 +76399 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0i\0\0\0\0\0\0"..., 832) = 832 +76399 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\"\0\0\0\0\0\0"..., 832) = 832 +76399 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 p\1\0\0\0\0\0"..., 832) = 832 +76399 read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\363\0\0\0\0\0\0"..., 832) = 832 +76399 read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`|\2\0\0\0\0\0"..., 832) = 832 +76399 read(11, "# Name Service Switch configurat"..., 4096) = 328 +76399 read(11, "", 4096) = 0 +76399 read(11, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P5\0\0\0\0\0\0"..., 832) = 832 +76399 read(11, "root:x:0:0::/root:/bin/bash\nbin:"..., 4096) = 1257 +76399 read(11, "# GNU libc iconv configuration.\n"..., 4096) = 4096 +76399 read(11, "B1002//\tJUS_I.B1.002//\nmodule\tJU"..., 4096) = 4096 +76399 read(11, "\tISO-IR-110//\t\tISO-8859-4//\nalia"..., 4096) = 4096 +76399 read(11, "\t\t\tISO-8859-14//\nalias\tISO_8859-"..., 4096) = 4096 +76399 read(11, "DIC-ES//\nalias\tEBCDICES//\t\tEBCDI"..., 4096) = 4096 +76399 read(11, "CDIC-CP-ES//\t\tIBM284//\nalias\tCSI"..., 4096) = 4096 +76399 read(11, "\t\tIBM863//\nalias\tOSF1002035F//\t\t"..., 4096) = 4096 +76399 read(11, "937//\t\tIBM937//\nmodule\tIBM937//\t"..., 4096) = 4096 +76399 read(11, "UJIS//\t\t\tEUC-JP//\nmodule\tEUC-JP/"..., 4096) = 4096 +76399 read(11, "lias\tISO2022CN//\t\tISO-2022-CN//\n"..., 4096) = 4096 +76399 read(11, "O_5427-EXT//\nalias\tISO_5427EXT//"..., 4096) = 4096 +76399 read(11, "ost\nmodule\tMAC-SAMI//\t\tINTERNAL\t"..., 4096) = 4096 +76399 read(11, "112//\t\tINTERNAL\t\tIBM1112\t\t1\nmodu"..., 4096) = 4096 +76399 read(11, "s\tCP9448//\t\tIBM9448//\nalias\tCSIB"..., 4096) = 3105 +76399 read(11, "", 4096) = 0 +76399 read(11, "1000", 12) = 4 +76399 read(11, "root:x:0:0::/root:/bin/bash\nbin:"..., 4096) = 1257 +76399 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \220\0\0\0\0\0\0"..., 832) = 832 +76399 read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`|\2\0\0\0\0\0"..., 832) = 832 +76399 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 p\1\0\0\0\0\0"..., 832) = 832 +76399 write(2, "$ ", 2) = 2 +76399 read(0, +76398 read(3, "$ ", 8192) = 2 +76398 write(1, "$ ", 2) = 2 +76398 read(0, "s", 8192) = 1 +76398 write(3, "s", 1) = 1 +76398 read(3, "s", 8192) = 1 +76398 write(1, "s", 1) = 1 +76398 read(0, "t", 8192) = 1 +76398 write(3, "t", 1) = 1 +76398 read(3, "t", 8192) = 1 +76398 write(1, "t", 1) = 1 +76398 read(0, "t", 8192) = 1 +76398 write(3, "t", 1) = 1 +76398 read(3, "t", 8192) = 1 +76398 write(1, "t", 1) = 1 +76398 read(0, "y", 8192) = 1 +76398 write(3, "y", 1) = 1 +76398 read(3, "y", 8192) = 1 +76398 write(1, "y", 1) = 1 +76398 read(0, " ", 8192) = 1 +76398 write(3, " ", 1) = 1 +76398 read(3, " ", 8192) = 1 +76398 write(1, " ", 1) = 1 +76398 read(0, "-", 8192) = 1 +76398 write(3, "-", 1) = 1 +76398 read(3, "-", 8192) = 1 +76398 write(1, "-", 1) = 1 +76398 read(0, "a", 8192) = 1 +76398 write(3, "a", 1) = 1 +76398 read(3, "a", 8192) = 1 +76398 write(1, "a", 1) = 1 +76398 read(0, "\r", 8192) = 1 +76398 write(3, "\r", 1) = 1 +76399 <... read resumed>"stty -a\n", 8192) = 8 +76398 read(3, "\r\n", 8192) = 2 +76398 write(1, "\r\n", 2) = 2 +76419 read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`|\2\0\0\0\0\0"..., 832) = 832 +76419 read(3, "# Locale name alias data base.\n#"..., 4096) = 2998 +76419 read(3, "", 4096) = 0 +76419 write(1, "speed 38400 baud; rows 69; colum"..., 50) = 50 +76419 write(1, "intr = ^C; quit = ^\\; erase = ^?"..., 115) = 115 +76419 write(1, "stop = ^S; susp = ^Z; rprnt = ^R"..., 92 +76398 read(3, +76419 <... write resumed>) = 92 +76398 <... read resumed>"speed 38400 baud; rows 69; colum"..., 8192) = 260 +76419 write(1, "-parenb -parodd -cmspar cs8 -hup"..., 66) = 66 +76398 write(1, "speed 38400 baud; rows 69; colum"..., 260 +76419 write(1, "-ignbrk brkint ignpar -parmrk -i"..., 105 +76398 <... write resumed>) = 260 +76419 <... write resumed>) = 105 +76419 write(1, "opost -olcuc -ocrnl onlcr -onocr"..., 80) = 80 +76398 read(3, "-parenb -parodd -cmspar cs8 -hup"..., 8192) = 254 +76419 write(1, "isig icanon iexten echo echoe ec"..., 108) = 108 +76398 write(1, "-parenb -parodd -cmspar cs8 -hup"..., 254) = 254 +76398 read(3, "isig icanon iexten echo echoe ec"..., 8192) = 109 +76398 write(1, "isig icanon iexten echo echoe ec"..., 109) = 109 +76419 +++ exited with 0 +++ +76399 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=76419, si_uid=1000, si_status=0, si_utime=0, si_stime=0} --- +76399 write(2, "$ ", 2) = 2 +76399 read(0, +76398 read(3, "$ ", 8192) = 2 +76398 write(1, "$ ", 2) = 2 +76398 read(0, "\33[A", 8192) = 3 +76398 write(3, "\33[A", 3) = 3 +76398 read(3, "^[[A", 8192) = 4 +76398 write(1, "^[[A", 4) = 4 +76398 read(0, " ", 8192) = 1 +76398 write(3, " ", 1) = 1 +76398 read(3, " ", 8192) = 1 +76398 write(1, " ", 1) = 1 +76398 read(0, "|", 8192) = 1 +76398 write(3, "|", 1) = 1 +76398 read(3, "|", 8192) = 1 +76398 write(1, "|", 1) = 1 +76398 read(0, " ", 8192) = 1 +76398 write(3, " ", 1) = 1 +76398 read(3, " ", 8192) = 1 +76398 write(1, " ", 1) = 1 +76398 read(0, "\177", 8192) = 1 +76398 write(3, "\177", 1) = 1 +76398 read(3, "\10 \10", 8192) = 3 +76398 write(1, "\10 \10", 3) = 3 +76398 read(0, "\177", 8192) = 1 +76398 write(3, "\177", 1) = 1 +76398 read(3, "\10 \10", 8192) = 3 +76398 write(1, "\10 \10", 3) = 3 +76398 read(0, "\177", 8192) = 1 +76398 write(3, "\177", 1) = 1 +76398 read(3, "\10 \10", 8192) = 3 +76398 write(1, "\10 \10", 3) = 3 +76398 read(0, "\177", 8192) = 1 +76398 write(3, "\177", 1) = 1 +76398 read(3, "\10 \10", 8192) = 3 +76398 write(1, "\10 \10", 3) = 3 +76398 read(0, "\177", 8192) = 1 +76398 write(3, "\177", 1) = 1 +76398 read(3, "\10 \10", 8192) = 3 +76398 write(1, "\10 \10", 3) = 3 +76398 read(0, "\177", 8192) = 1 +76398 write(3, "\177", 1) = 1 +76398 read(3, "\10 \10\10 \10", 8192) = 6 +76398 write(1, "\10 \10\10 \10", 6) = 6 +76398 read(0, "\177", 8192) = 1 +76398 write(3, "\177", 1) = 1 +76398 read(0, "\177", 8192) = 1 +76398 write(3, "\177", 1) = 1 +76398 read(0, "\177", 8192) = 1 +76398 write(3, "\177", 1) = 1 +76398 read(0, "\177", 8192) = 1 +76398 write(3, "\177", 1) = 1 +76398 read(0, "s", 8192) = 1 +76398 write(3, "s", 1) = 1 +76398 read(3, "s", 8192) = 1 +76398 write(1, "s", 1) = 1 +76398 read(0, "t", 8192) = 1 +76398 write(3, "t", 1) = 1 +76398 read(3, "t", 8192) = 1 +76398 write(1, "t", 1) = 1 +76398 read(0, "t", 8192) = 1 +76398 write(3, "t", 1) = 1 +76398 read(3, "t", 8192) = 1 +76398 write(1, "t", 1) = 1 +76398 read(0, "y", 8192) = 1 +76398 write(3, "y", 1) = 1 +76398 read(3, "y", 8192) = 1 +76398 write(1, "y", 1) = 1 +76398 read(0, " ", 8192) = 1 +76398 write(3, " ", 1) = 1 +76398 read(3, " ", 8192) = 1 +76398 write(1, " ", 1) = 1 +76398 read(0, "-", 8192) = 1 +76398 write(3, "-", 1) = 1 +76398 read(3, "-", 8192) = 1 +76398 write(1, "-", 1) = 1 +76398 read(0, "a", 8192) = 1 +76398 write(3, "a", 1) = 1 +76398 read(3, "a", 8192) = 1 +76398 write(1, "a", 1) = 1 +76398 read(0, " ", 8192) = 1 +76398 write(3, " ", 1) = 1 +76398 read(3, " ", 8192) = 1 +76398 write(1, " ", 1) = 1 +76398 read(0, "|", 8192) = 1 +76398 write(3, "|", 1) = 1 +76398 read(3, "|", 8192) = 1 +76398 write(1, "|", 1) = 1 +76398 read(0, " ", 8192) = 1 +76398 write(3, " ", 1) = 1 +76398 read(3, " ", 8192) = 1 +76398 write(1, " ", 1) = 1 +76398 read(0, "l", 8192) = 1 +76398 write(3, "l", 1) = 1 +76398 read(3, "l", 8192) = 1 +76398 write(1, "l", 1) = 1 +76398 read(0, "e", 8192) = 1 +76398 write(3, "e", 1) = 1 +76398 read(3, "e", 8192) = 1 +76398 write(1, "e", 1) = 1 +76398 read(0, "s", 8192) = 1 +76398 write(3, "s", 1) = 1 +76398 read(3, "s", 8192) = 1 +76398 write(1, "s", 1) = 1 +76398 read(0, "s", 8192) = 1 +76398 write(3, "s", 1) = 1 +76398 read(3, "s", 8192) = 1 +76398 write(1, "s", 1) = 1 +76398 read(0, " ", 8192) = 1 +76398 write(3, " ", 1) = 1 +76398 read(3, " ", 8192) = 1 +76398 write(1, " ", 1) = 1 +76398 read(0, "\r", 8192) = 1 +76398 write(3, "\r", 1) = 1 +76399 <... read resumed>"stty -a | less \n", 8192) = 16 +76398 read(3, "\r\n", 8192) = 2 +76398 write(1, "\r\n", 2) = 2 +76486 read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`|\2\0\0\0\0\0"..., 832) = 832 +76487 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 p\1\0\0\0\0\0"..., 832) = 832 +76487 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 0\0\0\0\0\0\0"..., 832) = 832 +76487 read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`|\2\0\0\0\0\0"..., 832) = 832 +76486 read(3, "# Locale name alias data base.\n#"..., 4096) = 2998 +76486 read(3, "", 4096) = 0 +76487 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\200\0\0\0\0\0\0"..., 832) = 832 +76486 write(1, "speed 38400 baud; rows 69; colum"..., 616) = 616 +76486 +++ exited with 0 +++ +76399 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=76486, si_uid=1000, si_status=0, si_utime=0, si_stime=0} --- +76487 read(3, "\32\1N\0\35\0\37\0p\1)\5rxvt-unicode-256colo"..., 32768) = 2239 +76487 read(3, "", 28672) = 0 +76487 read(3, ".less-history-file:\n.search\n\"EIN"..., 4096) = 726 +76487 read(3, "", 4096) = 0 +76487 write(1, "\33[?1049h\33=\r", 11) = 11 +76487 read(0, "speed 38400 baud; rows 69; colum"..., 8192) = 616 +76398 read(3, "\33[?1049h\33=\r", 8192) = 11 +76398 write(1, "\33[?1049h\33=\r", 11) = 11 +76487 write(1, "speed 38400 baud; rows 69; colum"..., 646) = 646 +76487 read(0, "", 7576) = 0 +76398 read(3, "speed 38400 baud; rows 69; colum"..., 8192) = 656 +76487 write(1, "\33[7m(END)\33[27m\33[K", 17) = 17 +76398 write(1, "speed 38400 baud; rows 69; colum"..., 656 +76487 read(3, +76398 <... write resumed>) = 656 +76398 read(3, "\33[7m(END)\33[27m\33[K", 8192) = 17 +76398 write(1, "\33[7m(END)\33[27m\33[K", 17) = 17 +76398 read(0, "/", 8192) = 1 +76398 write(3, "/", 1) = 1 +76487 <... read resumed>"/", 1) = 1 +76487 write(1, "\r\33[K/", 5) = 5 +76398 read(3, +76487 read(3, +76398 <... read resumed>"\r\33[K/", 8192) = 5 +76398 write(1, "\r\33[K/", 5) = 5 +76398 read(0, "i", 8192) = 1 +76398 write(3, "i", 1) = 1 +76487 <... read resumed>"i", 1) = 1 +76487 write(1, "\33[Ki\10i", 6) = 6 +76487 read(3, +76398 read(3, "\33[Ki\10i", 8192) = 6 +76398 write(1, "\33[Ki\10i", 6) = 6 +76398 read(0, "c", 8192) = 1 +76398 write(3, "c", 1) = 1 +76487 <... read resumed>"c", 1) = 1 +76487 write(1, "\33[Kc\10c", 6) = 6 +76487 read(3, +76398 read(3, "\33[Kc\10c", 8192) = 6 +76398 write(1, "\33[Kc\10c", 6) = 6 +76398 read(0, "r", 8192) = 1 +76398 write(3, "r", 1) = 1 +76487 <... read resumed>"r", 1) = 1 +76487 write(1, "\33[Kr\10r", 6) = 6 +76487 read(3, +76398 read(3, "\33[Kr\10r", 8192) = 6 +76398 write(1, "\33[Kr\10r", 6) = 6 +76398 read(0, "n", 8192) = 1 +76398 write(3, "n", 1) = 1 +76487 <... read resumed>"n", 1) = 1 +76487 write(1, "\33[Kn\10n", 6) = 6 +76398 read(3, +76487 read(3, +76398 <... read resumed>"\33[Kn\10n", 8192) = 6 +76398 write(1, "\33[Kn\10n", 6) = 6 +76398 read(0, "l", 8192) = 1 +76398 write(3, "l", 1) = 1 +76487 <... read resumed>"l", 1) = 1 +76487 write(1, "\33[Kl\10l", 6) = 6 +76398 read(3, +76487 read(3, +76398 <... read resumed>"\33[Kl\10l", 8192) = 6 +76398 write(1, "\33[Kl\10l", 6) = 6 +76398 read(0, "\r", 8192) = 1 +76398 write(3, "\r", 1) = 1 +76487 <... read resumed>"\n", 1) = 1 +76487 write(1, "\r\33[K", 4) = 4 +76398 read(3, "\r\33[K", 8192) = 4 +76398 write(1, "\r\33[K", 4) = 4 +76487 write(1, "...skipping...\nspeed 38400 baud;"..., 1023) = 1023 +76398 read(3, "...skipping...\r\nspeed 38400 baud"..., 8192) = 1073 +76398 write(1, "...skipping...\r\nspeed 38400 baud"..., 1073) = 1073 +76487 write(1, "1m~\33[m\n\33[1m~\33[m\n\33[1m~\33[m\n\33[1m~\33["..., 1023) = 1023 +76398 read(3, "1m~\33[m\r\n\33[1m~\33[m\r\n\33[1m~\33[m\r\n\33[1m"..., 8192) = 1054 +76398 write(1, "1m~\33[m\r\n\33[1m~\33[m\r\n\33[1m~\33[m\r\n\33[1m"..., 1054 +76487 write(1, "= ;\33[m\n\33[3;1Heol2 = +76398 <... write resumed>) = 1054 +76487 <... write resumed>) = 677 +76487 read(3, +76398 read(3, "= ;\33[m\r\n\33[3;1Heol2 = ;\33[m\r\n\33[3;1Heol2 = "/", 1) = 1 +76487 write(1, "\r\33[K/", 5) = 5 +76487 read(3, +76398 read(3, "\r\33[K/", 8192) = 5 +76398 write(1, "\r\33[K/", 5) = 5 +76398 read(0, "o", 8192) = 1 +76398 write(3, "o", 1) = 1 +76487 <... read resumed>"o", 1) = 1 +76487 write(1, "\33[Ko\10o", 6) = 6 +76487 read(3, +76398 read(3, "\33[Ko\10o", 8192) = 6 +76398 write(1, "\33[Ko\10o", 6) = 6 +76398 read(0, "n", 8192) = 1 +76398 write(3, "n", 1) = 1 +76487 <... read resumed>"n", 1) = 1 +76487 write(1, "\33[Kn\10n", 6) = 6 +76487 read(3, +76398 read(3, "\33[Kn\10n", 8192) = 6 +76398 write(1, "\33[Kn\10n", 6) = 6 +76398 read(0, "l", 8192) = 1 +76398 write(3, "l", 1) = 1 +76487 <... read resumed>"l", 1) = 1 +76487 write(1, "\33[Kl\10l", 6) = 6 +76487 read(3, +76398 read(3, "\33[Kl\10l", 8192) = 6 +76398 write(1, "\33[Kl\10l", 6) = 6 +76398 read(0, "c", 8192) = 1 +76398 write(3, "c", 1) = 1 +76487 <... read resumed>"c", 1) = 1 +76487 write(1, "\33[Kc\10c", 6) = 6 +76487 read(3, +76398 read(3, "\33[Kc\10c", 8192) = 6 +76398 write(1, "\33[Kc\10c", 6) = 6 +76398 read(0, "r", 8192) = 1 +76398 write(3, "r", 1) = 1 +76487 <... read resumed>"r", 1) = 1 +76487 write(1, "\33[Kr\10r", 6) = 6 +76487 read(3, +76398 read(3, "\33[Kr\10r", 8192) = 6 +76398 write(1, "\33[Kr\10r", 6) = 6 +76398 read(0, "\r", 8192) = 1 +76398 write(3, "\r", 1) = 1 +76487 <... read resumed>"\n", 1) = 1 +76487 write(1, "\r\33[K", 4) = 4 +76398 read(3, "\r\33[K", 8192) = 4 +76487 write(1, "\33[1;1H-ignbrk brkint ignpar -par"..., 764) = 764 +76398 write(1, "\r\33[K", 4 +76487 read(3, +76398 <... write resumed>) = 4 +76398 read(3, "\33[1;1H-ignbrk brkint ignpar -par"..., 8192) = 778 +76398 write(1, "\33[1;1H-ignbrk brkint ignpar -par"..., 778) = 778 +76398 read(0, "q", 8192) = 1 +76398 write(3, "q", 1) = 1 +76487 <... read resumed>"q", 1) = 1 +76487 read(5, ".less-history-file:\n.search\n\"EIN"..., 4096) = 726 +76487 read(5, "", 4096) = 0 +76487 write(4, ".less-history-file:\n.search\n\"EIN"..., 728) = 728 +76487 write(1, "\r\33[K\33>\33[r\33[?1049l", 17) = 17 +76398 read(3, "\r\33[K\33>\33[r\33[?1049l", 8192) = 17 +76398 write(1, "\r\33[K\33>\33[r\33[?1049l", 17) = 17 +76487 +++ exited with 0 +++ +76399 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=76487, si_uid=1000, si_status=0, si_utime=0, si_stime=0} --- +76399 write(2, "$ ", 2) = 2 +76399 read(0, +76398 read(3, "$ ", 8192) = 2 +76398 write(1, "$ ", 2) = 2 +76398 read(0, "\r", 8192) = 1 +76398 write(3, "\r", 1) = 1 +76399 <... read resumed>"\n", 8192) = 1 +76398 read(3, "\r\n", 8192) = 2 +76398 write(1, "\r\n", 2) = 2 +76399 write(2, "$ ", 2) = 2 +76399 read(0, +76398 read(3, "$ ", 8192) = 2 +76398 write(1, "$ ", 2) = 2 +76398 read(0, "\r", 8192) = 1 +76398 write(3, "\r", 1) = 1 +76399 <... read resumed>"\n", 8192) = 1 +76398 read(3, "\r\n", 8192) = 2 +76398 write(1, "\r\n", 2) = 2 +76399 write(2, "$ ", 2) = 2 +76399 read(0, +76398 read(3, "$ ", 8192) = 2 +76398 write(1, "$ ", 2) = 2 +76398 read(0, "e", 8192) = 1 +76398 write(3, "e", 1) = 1 +76398 read(3, "e", 8192) = 1 +76398 write(1, "e", 1) = 1 +76398 read(0, "x", 8192) = 1 +76398 write(3, "x", 1) = 1 +76398 read(3, "x", 8192) = 1 +76398 write(1, "x", 1) = 1 +76398 read(0, "i", 8192) = 1 +76398 write(3, "i", 1) = 1 +76398 read(3, "i", 8192) = 1 +76398 write(1, "i", 1) = 1 +76398 read(0, "t", 8192) = 1 +76398 write(3, "t", 1) = 1 +76398 read(3, "t", 8192) = 1 +76398 write(1, "t", 1) = 1 +76398 read(0, " ", 8192) = 1 +76398 write(3, " ", 1) = 1 +76398 read(3, " ", 8192) = 1 +76398 write(1, " ", 1) = 1 +76398 read(0, "4", 8192) = 1 +76398 write(3, "4", 1) = 1 +76398 read(3, "4", 8192) = 1 +76398 write(1, "4", 1) = 1 +76398 read(0, "2", 8192) = 1 +76398 write(3, "2", 1) = 1 +76398 read(3, "2", 8192) = 1 +76398 write(1, "2", 1) = 1 +76398 read(0, "\r", 8192) = 1 +76398 write(3, "\r", 1) = 1 +76399 <... read resumed>"exit 42\n", 8192) = 8 +76398 read(3, "\r\n", 8192) = 2 +76398 write(1, "\r\n", 2) = 2 +76399 +++ exited with 42 +++ +76398 read(5, "\21\0\0\0\0\0\0\0\1\0\0\0o*\1\0\350\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 128) = 128 +76398 write(6, "r0 tab0 bs0 vt0 ff0\33[m\r\n\33[9;1His"..., 1164) = 1164 +76398 write(7, "0.017664 2\n1.662435 1\n0.316199 1"..., 835) = 835 +76398 write(1, "Script done.\n", 13) = 13 +76398 +++ exited with 0 +++ diff --git a/semestr-5/so/lista4/so21_lista_4.tar.gz b/semestr-5/so/lista4/so21_lista_4.tar.gz new file mode 100644 index 0000000..92aacb3 Binary files /dev/null and b/semestr-5/so/lista4/so21_lista_4.tar.gz differ diff --git a/semestr-5/so/lista4/so21_lista_4/Makefile.include b/semestr-5/so/lista4/so21_lista_4/Makefile.include new file mode 100644 index 0000000..196c9a5 --- /dev/null +++ b/semestr-5/so/lista4/so21_lista_4/Makefile.include @@ -0,0 +1,105 @@ +CC = gcc -g +CFLAGS = -Og -Wall -Werror -Wstrict-prototypes +AS = as -g +ASFLAGS = +CPPFLAGS = -Iinclude +LDLIBS = -Llibcsapp -lcsapp +SED = sed + +# Recognize operating system +ifeq ($(shell uname -s), Darwin) +CPPFLAGS += -DMACOS +SED = gsed +endif + +ifeq ($(shell uname -s), Linux) +CPPFLAGS += -DLINUX +endif + +ifeq ($(shell uname -s), FreeBSD) +CPPFLAGS += -DFREEBSD +endif + +# Pass "VERBOSE=1" at command line to display command being invoked by GNU Make +ifneq ($(VERBOSE), 1) +.SILENT: +endif + +LIBSRC_C = $(wildcard libcsapp/*.c) +LIBSRC_S = $(wildcard libcsapp/*.s) +LIBSRC_H = $(wildcard include/*.h) +LIBSRCS = $(LIBSRC_C) $(LIBSRC_S) $(LIBSRC_H) +LIBOBJS = $(LIBSRC_C:%.c=%.o) +ifneq ($(shell uname -s), Darwin) +LIBOBJS += $(LIBSRC_S:%.s=%.o) +endif +LIB = libcsapp/libcsapp.a + +SRC_C = $(wildcard *.c) +SRC_S = $(wildcard *.s) +SRC_H = $(wildcard *.h) +SRCS = $(SRC_C) $(SRC_S) +OBJS = $(SRC_C:%.c=%.o) + +SOURCES = $(SRCS) $(LIBSRCS) +OBJECTS = $(OBJS) $(LIBOBJS) +DEPFILES = $(foreach f,$(SRC_C) $(LIBSRC_C),\ + $(dir $(f))$(patsubst %.c,.%.d,$(notdir $(f)))) + +ARCHIVE = so$(shell date +'%y')_$(shell basename $(PWD)) +FILES = Makefile Makefile.include $(EXTRA-FILES) + +all: $(DEPFILES) $(LIB) $(PROGS) + +$(LIB): $(LIBOBJS) + +# Generate dependencies automatically +ifeq ($(words $(findstring $(MAKECMDGOALS), archive clean)), 0) + -include $(DEPFILES) +endif + +# Disable all built-in recipes and define our own +.SUFFIXES: + +.%.d: %.c + $(CC) $(CPPFLAGS) -MM -MG -o $@ $< + +%.o: %.c .%.d + @echo "[CC] $@ <- $<" + $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< + +%.o: %.s + @echo "[AS] $@ <- $<" + $(AS) $(ASFLAGS) -c -o $@ $< + +%.a: + @echo "[AR] $@ <- $^" + $(AR) rc $@ $^ + +%: %.o $(LIB) + @echo "[LD] $@ <- $^" + $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) + +clean: + rm -vf $(PROGS) $(OBJECTS) $(DEPFILES) $(LIB) + rm -vf $(shell find -L . -iname '*~') + rm -vf $(ARCHIVE).tar.gz + rm -vrf $(EXTRA-CLEAN) *.dSYM + +format: + clang-format --style=file -i $(LIBSRC_C) $(LIBSRC_H) $(SRC_C) $(SRC_H) + +archive: clean + mkdir -p $(ARCHIVE) $(ARCHIVE)/libcsapp $(ARCHIVE)/include + cp -L $(SRCS) $(SRC_H) $(FILES) $(ARCHIVE)/ + cp -L $(LIBSRCS) $(ARCHIVE)/libcsapp/ + cp -L $(LIBSRC_H) $(ARCHIVE)/include/ + for f in $(SRCS:%=$(ARCHIVE)/%); do \ + $(SED) --in-place='' -e '/^#if.*STUDENT/,/^#endif.*STUDENT/d' $$f; \ + done + tar cvzhf $(ARCHIVE).tar.gz $(ARCHIVE) + rm -rf $(ARCHIVE) + +.PHONY: all clean format archive + +# vim: ts=8 sw=8 noet diff --git a/semestr-5/so/lista4/so21_lista_4/holes.bin b/semestr-5/so/lista4/so21_lista_4/holes.bin new file mode 100644 index 0000000..e8726ca Binary files /dev/null and b/semestr-5/so/lista4/so21_lista_4/holes.bin differ diff --git a/semestr-5/so/lista4/so21_lista_4/include/bitstring.h b/semestr-5/so/lista4/so21_lista_4/include/bitstring.h new file mode 100644 index 0000000..66503f0 --- /dev/null +++ b/semestr-5/so/lista4/so21_lista_4/include/bitstring.h @@ -0,0 +1,138 @@ +/* $NetBSD: bitstring.h,v 1.14 2016/03/17 02:25:32 christos Exp $ */ + +/* + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Paul Vixie. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)bitstring.h 8.1 (Berkeley) 7/19/93 + */ + +#ifndef _BITSTRING_H_ +#define _BITSTRING_H_ + +/* modified for SV/AT and bitstring bugfix by M.R.Murphy, 11oct91 + * bitstr_size changed gratuitously, but shorter + * bit_alloc spelling error fixed + * the following were efficient, but didn't work, they've been made to + * work, but are no longer as efficient :-) + * bit_nclear, bit_nset, bit_ffc, bit_ffs + */ +/* + * The comment above may or may not bear any resemblance to reality. + * This code has been maintained in a confusing way, with little + * information available on the provenance of much of it. "At least it + * works." + * /s/ Perry E. Metzger, 2 Feb 98 + */ +typedef unsigned char bitstr_t; + +/* internal macros */ +/* byte of the bitstring bit is in */ +#define _bit_byte(bit) (uint32_t)((bit) >> 3) + +/* mask for the bit within its byte */ +#define _bit_mask(bit) (uint32_t)((1 << (uint32_t)((bit)&0x7))) + +/* external macros */ +/* bytes in a bitstring of nbits bits */ +#define bitstr_size(nbits) (size_t)((uint32_t)((nbits) + 7) >> 3) + +/* allocate a bitstring */ +#define bit_alloc(nbits) calloc(bitstr_size(nbits), sizeof(bitstr_t)) + +/* allocate a bitstring on the stack */ +#define bit_decl(name, nbits) ((name)[bitstr_size(nbits)]) + +/* is bit N of bitstring name set? */ +#define bit_test(name, bit) \ + /*LINTED bitwise on signed*/ ((name)[_bit_byte(bit)] & _bit_mask(bit)) + +/* set bit N of bitstring name */ +#define bit_set(name, bit) \ + /*LINTED bitwise on signed*/ \ + ((name)[_bit_byte(bit)] = \ + (unsigned char)(_bit_mask(bit) | (name)[_bit_byte(bit)])) + +/* clear bit N of bitstring name */ +#define bit_clear(name, bit) \ + /*LINTED bitwise on signed*/ \ + ((name)[_bit_byte(bit)] &= (unsigned char)~_bit_mask(bit)) + +/* clear bits start ... stop in bitstring */ +#define bit_nclear(name, start, stop) \ + do { \ + bitstr_t *_name = name; \ + size_t _start = start, _stop = stop; \ + while (_start <= _stop) { \ + bit_clear(_name, _start); \ + _start++; \ + } \ + } while (/*CONSTCOND*/ 0) + +/* set bits start ... stop in bitstring */ +#define bit_nset(name, start, stop) \ + do { \ + bitstr_t *_name = name; \ + size_t _start = start, _stop = stop; \ + while (_start <= _stop) { \ + bit_set(_name, _start); \ + _start++; \ + } \ + } while (/*CONSTCOND*/ 0) + +/* find first bit clear in name */ +#define bit_ffc(name, nbits, value) \ + do { \ + const bitstr_t *_name = name; \ + size_t _bit, _nbits = nbits; \ + int _value = -1; \ + for (_bit = 0; _bit < _nbits; ++_bit) \ + if (!bit_test(_name, _bit)) { \ + _value = _bit; \ + break; \ + } \ + *(value) = _value; \ + } while (/*CONSTCOND*/ 0) + +/* find first bit set in name */ +#define bit_ffs(name, nbits, value) \ + do { \ + const bitstr_t *_name = name; \ + size_t _bit, _nbits = nbits; \ + int _value = -1; \ + for (_bit = 0; _bit < _nbits; ++_bit) \ + if (bit_test(_name, _bit)) { \ + _value = _bit; \ + break; \ + } \ + *(value) = _value; \ + } while (/*CONSTCOND*/ 0) + +#endif /* !_BITSTRING_H_ */ diff --git a/semestr-5/so/lista4/so21_lista_4/include/csapp.h b/semestr-5/so/lista4/so21_lista_4/include/csapp.h new file mode 100644 index 0000000..dabdf77 --- /dev/null +++ b/semestr-5/so/lista4/so21_lista_4/include/csapp.h @@ -0,0 +1,240 @@ +#ifndef __CSAPP_H__ +#define __CSAPP_H__ + +#include +#include +#ifdef LINUX +#include +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define _CONCAT(x, y) x##y +#define CONCAT(x, y) _CONCAT(x, y) + +#define min(a, b) \ + ({ \ + typeof(a) _a = (a); \ + typeof(b) _b = (b); \ + _a < _b ? _a : _b; \ + }) + +#define max(a, b) \ + ({ \ + typeof(a) _a = (a); \ + typeof(b) _b = (b); \ + _a > _b ? _a : _b; \ + }) + +#ifndef powerof2 +#define powerof2(x) (((x) & ((x)-1)) == 0) +#endif + +#ifndef __unused +#define __unused __attribute__((unused)) +#endif + +extern char **environ; + +/* Useful constants. */ +#define MAXLINE 4096 + +/* Our own error-handling functions */ +noreturn void unix_error(const char *fmt, ...) + __attribute__((format(printf, 1, 2))); +noreturn void posix_error(int code, const char *fmt, ...) + __attribute__((format(printf, 2, 3))); +noreturn void app_error(const char *fmt, ...) + __attribute__((format(printf, 1, 2))); +noreturn void gai_error(int code, const char *fmt, ...) + __attribute__((format(printf, 2, 3))); + +/* Signal safe I/O functions */ +void safe_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2))); +void safe_error(const char *fmt, ...) __attribute__((format(printf, 1, 2))); + +/* Decent hashing function. */ +#define HASHINIT 5381 + +uint32_t jenkins_hash(const void *key, size_t length, uint32_t initval); + +/* Memory allocation wrappers */ +void *Malloc(size_t size); +void *Realloc(void *ptr, size_t size); +void *Calloc(size_t nmemb, size_t size); + +/* Process control wrappers */ +pid_t Fork(void); +pid_t Waitpid(pid_t pid, int *iptr, int options); +#define Wait(iptr) Waitpid(-1, iptr, 0) +void Prctl(int option, long arg); + +/* Process environment */ +char *Getcwd(char *buf, size_t buflen); + +/* Signal control wrappers */ +void (*Signal(int sig, void (*func)(int)))(int); +void Kill(pid_t pid, int sig); +void Sigprocmask(int how, const sigset_t *set, sigset_t *oldset); +void Sigaction(int signum, const struct sigaction *act, + struct sigaction *oldact); +void Sigsuspend(const sigset_t *mask); + +/* Process group control wrappers */ +void Setpgid(pid_t pid, pid_t pgid); + +/* Stdio wrappers */ +char *Fgets(char *ptr, int n, FILE *stream); +void Fputs(const char *ptr, FILE *stream); + +/* Unix I/O wrappers */ +int Open(const char *pathname, int flags, mode_t mode); +size_t Read(int fd, void *buf, size_t count); +size_t Write(int fd, const void *buf, size_t count); +size_t Writev(int fd, const struct iovec *iov, int iovcnt); +off_t Lseek(int fildes, off_t offset, int whence); +void Close(int fd); +void Ftruncate(int fd, off_t length); +int Dup(int fd); +int Dup2(int oldfd, int newfd); +void Pipe(int fds[2]); +void Socketpair(int domain, int type, int protocol, int sv[2]); +int Select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, + struct timeval *timeout); +int Poll(struct pollfd *fds, nfds_t nfds, int timeout); + +/* Directory access (Linux specific) */ +struct linux_dirent { + unsigned long d_ino; /* Inode number */ + unsigned long d_off; /* Offset to next linux_dirent */ + unsigned short d_reclen; /* Length of this linux_dirent */ + char d_name[]; /* Filename (null-terminated) */ +}; + +int Getdents(int fd, struct linux_dirent *dirp, unsigned count); + +/* Directory operations */ +void Rename(const char *oldpath, const char *newpath); +void Unlink(const char *pathname); + +/* File metadata access wrapper */ +void Fstat(int fd, struct stat *statbuf); +void Fstatat(int dirfd, const char *pathname, struct stat *statbuf, int flags); +size_t Readlink(const char *pathname, char *buf, size_t bufsiz); +size_t Readlinkat(int dirfd, const char *pathname, char *buf, size_t bufsiz); + +/* Memory mapped files & anonymous memory */ +void *Mmap(void *addr, size_t length, int prot, int flags, int fd, + off_t offset); +void Mprotect(void *addr, size_t len, int prot); +void Munmap(void *addr, size_t len); +void Madvise(void *addr, size_t length, int advice); + +/* Terminal control */ +void Tcsetpgrp(int fd, pid_t pgrp); +pid_t Tcgetpgrp(int fd); +void Tcsetattr(int fd, int action, const struct termios *termios_p); +void Tcgetattr(int fd, struct termios *termios_p); + +/* Setjmp & longjmp implementation without sigprocmask */ +typedef struct { + long rbx; + long rbp; + long r12; + long r13; + long r14; + long r15; + void *rsp; + void *rip; +} Jmpbuf[1]; + +int Setjmp(Jmpbuf env); +noreturn void Longjmp(Jmpbuf env, int val); + +/* Socket interface wrappers. */ +typedef struct sockaddr SA; +int Socket(int domain, int type, int protocol); +void Setsockopt(int s, int level, int optname, const void *optval, int optlen); +void Bind(int sockfd, struct sockaddr *my_addr, int addrlen); +void Listen(int s, int backlog); +int Accept(int s, struct sockaddr *addr, socklen_t *addrlen); +void Connect(int sockfd, struct sockaddr *serv_addr, int addrlen); + +/* Protocol-independent wrappers. */ +void Getaddrinfo(const char *node, const char *service, + const struct addrinfo *hints, struct addrinfo **res); +void Getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, + size_t hostlen, char *serv, size_t servlen, int flags); +int open_clientfd(char *hostname, char *port); +int Open_clientfd(char *hostname, char *port); +int open_listenfd(char *port, int backlog); +int Open_listenfd(char *port, int backlog); + +/* POSIX thread control wrappers. */ + +void Pthread_create(pthread_t *tidp, pthread_attr_t *attrp, + void *(*routine)(void *), void *argp); +void Pthread_cancel(pthread_t tid); +void Pthread_join(pthread_t tid, void **thread_return); +void Pthread_detach(pthread_t tid); + +/* POSIX semaphore wrappers. */ +void Sem_init(sem_t *sem, int pshared, unsigned value); +void Sem_destroy(sem_t *sem); +void Sem_wait(sem_t *sem); +void Sem_getvalue(sem_t *sem, int *sval); +void Sem_post(sem_t *sem); + +/* POSIX mutex wrappers. */ +void Pthread_mutex_init(pthread_mutex_t *mutex, + const pthread_mutexattr_t *mutexattr); +void Pthread_mutex_destroy(pthread_mutex_t *mutex); +void Pthread_mutex_lock(pthread_mutex_t *mutex); +void Pthread_mutex_unlock(pthread_mutex_t *mutex); + +/* POSIX conditional variable wrappers. */ +void Pthread_cond_init(pthread_cond_t *cond, pthread_condattr_t *cond_attr); +void Pthread_cond_destroy(pthread_cond_t *cond); +void Pthread_cond_signal(pthread_cond_t *cond); +void Pthread_cond_broadcast(pthread_cond_t *cond); +void Pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex); + +/* POSIX reader-writer lock wrappers. */ +void Pthread_rwlock_init(pthread_rwlock_t *rwlock, + const pthread_rwlockattr_t *rwlockattr); +void Pthread_rwlock_destroy(pthread_rwlock_t *rwlock); +void Pthread_rwlock_rdlock(pthread_rwlock_t *rwlock); +void Pthread_rwlock_wrlock(pthread_rwlock_t *rwlock); +void Pthread_rwlock_unlock(pthread_rwlock_t *rwlock); + +#endif /* __CSAPP_H__ */ diff --git a/semestr-5/so/lista4/so21_lista_4/include/queue.h b/semestr-5/so/lista4/so21_lista_4/include/queue.h new file mode 100644 index 0000000..de4ddc9 --- /dev/null +++ b/semestr-5/so/lista4/so21_lista_4/include/queue.h @@ -0,0 +1,587 @@ +/* $NetBSD: queue.h,v 1.74 2019/03/23 12:01:18 maxv Exp $ */ + +/* + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)queue.h 8.5 (Berkeley) 8/20/94 + */ + +#ifndef _QUEUE_H_ +#define _QUEUE_H_ + +/* + * This file defines five types of data structures: singly-linked lists, + * lists, simple queues, tail queues, and circular queues. + * + * A singly-linked list is headed by a single forward pointer. The + * elements are singly linked for minimum space and pointer manipulation + * overhead at the expense of O(n) removal for arbitrary elements. New + * elements can be added to the list after an existing element or at the + * head of the list. Elements being removed from the head of the list + * should use the explicit macro for this purpose for optimum + * efficiency. A singly-linked list may only be traversed in the forward + * direction. Singly-linked lists are ideal for applications with large + * datasets and few or no removals or for implementing a LIFO queue. + * + * A list is headed by a single forward pointer (or an array of forward + * pointers for a hash table header). The elements are doubly linked + * so that an arbitrary element can be removed without a need to + * traverse the list. New elements can be added to the list before + * or after an existing element or at the head of the list. A list + * may only be traversed in the forward direction. + * + * A simple queue is headed by a pair of pointers, one the head of the + * list and the other to the tail of the list. The elements are singly + * linked to save space, so elements can only be removed from the + * head of the list. New elements can be added to the list after + * an existing element, at the head of the list, or at the end of the + * list. A simple queue may only be traversed in the forward direction. + * + * A tail queue is headed by a pair of pointers, one to the head of the + * list and the other to the tail of the list. The elements are doubly + * linked so that an arbitrary element can be removed without a need to + * traverse the list. New elements can be added to the list before or + * after an existing element, at the head of the list, or at the end of + * the list. A tail queue may be traversed in either direction. + * + * A circle queue is headed by a pair of pointers, one to the head of the + * list and the other to the tail of the list. The elements are doubly + * linked so that an arbitrary element can be removed without a need to + * traverse the list. New elements can be added to the list before or after + * an existing element, at the head of the list, or at the end of the list. + * A circle queue may be traversed in either direction, but has a more + * complex end of list detection. + * + * For details on the use of these macros, see the queue(3) manual page. + */ + +/* + * Include the definition of NULL only on NetBSD because sys/null.h + * is not available elsewhere. This conditional makes the header + * portable and it can simply be dropped verbatim into any system. + * The caveat is that on other systems some other header + * must provide NULL before the macros can be used. + */ + +/* + * Singly-linked List definitions. + */ +#define SLIST_HEAD(name, type) \ + struct name { \ + struct type *slh_first; /* first element */ \ + } + +#define SLIST_HEAD_INITIALIZER(head) \ + { NULL } + +#define SLIST_ENTRY(type) \ + struct { \ + struct type *sle_next; /* next element */ \ + } + +/* + * Singly-linked List access methods. + */ +#define SLIST_FIRST(head) ((head)->slh_first) +#define SLIST_END(head) NULL +#define SLIST_EMPTY(head) ((head)->slh_first == NULL) +#define SLIST_NEXT(elm, field) ((elm)->field.sle_next) + +#define SLIST_FOREACH(var, head, field) \ + for ((var) = (head)->slh_first; (var) != SLIST_END(head); \ + (var) = (var)->field.sle_next) + +#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ + for ((var) = SLIST_FIRST((head)); \ + (var) != SLIST_END(head) && ((tvar) = SLIST_NEXT((var), field), 1); \ + (var) = (tvar)) + +/* + * Singly-linked List functions. + */ +#define SLIST_INIT(head) \ + do { \ + (head)->slh_first = SLIST_END(head); \ + } while (/*CONSTCOND*/ 0) + +#define SLIST_INSERT_AFTER(slistelm, elm, field) \ + do { \ + (elm)->field.sle_next = (slistelm)->field.sle_next; \ + (slistelm)->field.sle_next = (elm); \ + } while (/*CONSTCOND*/ 0) + +#define SLIST_INSERT_HEAD(head, elm, field) \ + do { \ + (elm)->field.sle_next = (head)->slh_first; \ + (head)->slh_first = (elm); \ + } while (/*CONSTCOND*/ 0) + +#define SLIST_REMOVE_AFTER(slistelm, field) \ + do { \ + (slistelm)->field.sle_next = \ + SLIST_NEXT(SLIST_NEXT((slistelm), field), field); \ + } while (/*CONSTCOND*/ 0) + +#define SLIST_REMOVE_HEAD(head, field) \ + do { \ + (head)->slh_first = (head)->slh_first->field.sle_next; \ + } while (/*CONSTCOND*/ 0) + +#define SLIST_REMOVE(head, elm, type, field) \ + do { \ + if ((head)->slh_first == (elm)) { \ + SLIST_REMOVE_HEAD((head), field); \ + } else { \ + struct type *curelm = (head)->slh_first; \ + while (curelm->field.sle_next != (elm)) \ + curelm = curelm->field.sle_next; \ + curelm->field.sle_next = curelm->field.sle_next->field.sle_next; \ + } \ + } while (/*CONSTCOND*/ 0) + +/* + * List definitions. + */ +#define LIST_HEAD(name, type) \ + struct name { \ + struct type *lh_first; /* first element */ \ + } + +#define LIST_HEAD_INITIALIZER(head) \ + { NULL } + +#define LIST_ENTRY(type) \ + struct { \ + struct type *le_next; /* next element */ \ + struct type **le_prev; /* address of previous next element */ \ + } + +/* + * List access methods. + */ +#define LIST_FIRST(head) ((head)->lh_first) +#define LIST_END(head) NULL +#define LIST_EMPTY(head) ((head)->lh_first == LIST_END(head)) +#define LIST_NEXT(elm, field) ((elm)->field.le_next) + +#define LIST_FOREACH(var, head, field) \ + for ((var) = ((head)->lh_first); (var) != LIST_END(head); \ + (var) = ((var)->field.le_next)) + +#define LIST_FOREACH_SAFE(var, head, field, tvar) \ + for ((var) = LIST_FIRST((head)); \ + (var) != LIST_END(head) && ((tvar) = LIST_NEXT((var), field), 1); \ + (var) = (tvar)) + +#define LIST_MOVE(head1, head2, field) \ + do { \ + LIST_INIT((head2)); \ + if (!LIST_EMPTY((head1))) { \ + (head2)->lh_first = (head1)->lh_first; \ + (head2)->lh_first->field.le_prev = &(head2)->lh_first; \ + LIST_INIT((head1)); \ + } \ + } while (/*CONSTCOND*/ 0) + +/* + * List functions. + */ +#define LIST_INIT(head) \ + do { \ + (head)->lh_first = LIST_END(head); \ + } while (/*CONSTCOND*/ 0) + +#define LIST_INSERT_AFTER(listelm, elm, field) \ + do { \ + if (((elm)->field.le_next = (listelm)->field.le_next) != LIST_END(head)) \ + (listelm)->field.le_next->field.le_prev = &(elm)->field.le_next; \ + (listelm)->field.le_next = (elm); \ + (elm)->field.le_prev = &(listelm)->field.le_next; \ + } while (/*CONSTCOND*/ 0) + +#define LIST_INSERT_BEFORE(listelm, elm, field) \ + do { \ + (elm)->field.le_prev = (listelm)->field.le_prev; \ + (elm)->field.le_next = (listelm); \ + *(listelm)->field.le_prev = (elm); \ + (listelm)->field.le_prev = &(elm)->field.le_next; \ + } while (/*CONSTCOND*/ 0) + +#define LIST_INSERT_HEAD(head, elm, field) \ + do { \ + if (((elm)->field.le_next = (head)->lh_first) != LIST_END(head)) \ + (head)->lh_first->field.le_prev = &(elm)->field.le_next; \ + (head)->lh_first = (elm); \ + (elm)->field.le_prev = &(head)->lh_first; \ + } while (/*CONSTCOND*/ 0) + +#define LIST_REMOVE(elm, field) \ + do { \ + if ((elm)->field.le_next != NULL) \ + (elm)->field.le_next->field.le_prev = (elm)->field.le_prev; \ + *(elm)->field.le_prev = (elm)->field.le_next; \ + } while (/*CONSTCOND*/ 0) + +#define LIST_REPLACE(elm, elm2, field) \ + do { \ + if (((elm2)->field.le_next = (elm)->field.le_next) != NULL) \ + (elm2)->field.le_next->field.le_prev = &(elm2)->field.le_next; \ + (elm2)->field.le_prev = (elm)->field.le_prev; \ + *(elm2)->field.le_prev = (elm2); \ + } while (/*CONSTCOND*/ 0) + +/* + * Simple queue definitions. + */ +#define SIMPLEQ_HEAD(name, type) \ + struct name { \ + struct type *sqh_first; /* first element */ \ + struct type **sqh_last; /* addr of last next element */ \ + } + +#define SIMPLEQ_HEAD_INITIALIZER(head) \ + { NULL, &(head).sqh_first } + +#define SIMPLEQ_ENTRY(type) \ + struct { \ + struct type *sqe_next; /* next element */ \ + } + +/* + * Simple queue access methods. + */ +#define SIMPLEQ_FIRST(head) ((head)->sqh_first) +#define SIMPLEQ_END(head) NULL +#define SIMPLEQ_EMPTY(head) ((head)->sqh_first == SIMPLEQ_END(head)) +#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next) + +#define SIMPLEQ_FOREACH(var, head, field) \ + for ((var) = ((head)->sqh_first); (var) != SIMPLEQ_END(head); \ + (var) = ((var)->field.sqe_next)) + +#define SIMPLEQ_FOREACH_SAFE(var, head, field, next) \ + for ((var) = ((head)->sqh_first); \ + (var) != SIMPLEQ_END(head) && ((next = ((var)->field.sqe_next)), 1); \ + (var) = (next)) + +/* + * Simple queue functions. + */ +#define SIMPLEQ_INIT(head) \ + do { \ + (head)->sqh_first = NULL; \ + (head)->sqh_last = &(head)->sqh_first; \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_INSERT_HEAD(head, elm, field) \ + do { \ + if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \ + (head)->sqh_last = &(elm)->field.sqe_next; \ + (head)->sqh_first = (elm); \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_INSERT_TAIL(head, elm, field) \ + do { \ + (elm)->field.sqe_next = NULL; \ + *(head)->sqh_last = (elm); \ + (head)->sqh_last = &(elm)->field.sqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) \ + do { \ + if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL) \ + (head)->sqh_last = &(elm)->field.sqe_next; \ + (listelm)->field.sqe_next = (elm); \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_REMOVE_HEAD(head, field) \ + do { \ + if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \ + (head)->sqh_last = &(head)->sqh_first; \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_REMOVE_AFTER(head, elm, field) \ + do { \ + if (((elm)->field.sqe_next = (elm)->field.sqe_next->field.sqe_next) == \ + NULL) \ + (head)->sqh_last = &(elm)->field.sqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_REMOVE(head, elm, type, field) \ + do { \ + if ((head)->sqh_first == (elm)) { \ + SIMPLEQ_REMOVE_HEAD((head), field); \ + } else { \ + struct type *curelm = (head)->sqh_first; \ + while (curelm->field.sqe_next != (elm)) \ + curelm = curelm->field.sqe_next; \ + if ((curelm->field.sqe_next = curelm->field.sqe_next->field.sqe_next) == \ + NULL) \ + (head)->sqh_last = &(curelm)->field.sqe_next; \ + } \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_CONCAT(head1, head2) \ + do { \ + if (!SIMPLEQ_EMPTY((head2))) { \ + *(head1)->sqh_last = (head2)->sqh_first; \ + (head1)->sqh_last = (head2)->sqh_last; \ + SIMPLEQ_INIT((head2)); \ + } \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_LAST(head, type, field) \ + (SIMPLEQ_EMPTY((head)) \ + ? NULL \ + : ((struct type *)(void *)((char *)((head)->sqh_last) - \ + offsetof(struct type, field)))) + +/* + * Tail queue definitions. + */ +#define _TAILQ_HEAD(name, type, qual) \ + struct name { \ + qual type *tqh_first; /* first element */ \ + qual type *qual *tqh_last; /* addr of last next element */ \ + } +#define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type, ) + +#define TAILQ_HEAD_INITIALIZER(head) \ + { TAILQ_END(head), &(head).tqh_first } + +#define _TAILQ_ENTRY(type, qual) \ + struct { \ + qual type *tqe_next; /* next element */ \ + qual type *qual *tqe_prev; /* address of previous next element */ \ + } +#define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type, ) + +/* + * Tail queue access methods. + */ +#define TAILQ_FIRST(head) ((head)->tqh_first) +#define TAILQ_END(head) (NULL) +#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) +#define TAILQ_LAST(head, headname) \ + (*(((struct headname *)(void *)((head)->tqh_last))->tqh_last)) +#define TAILQ_PREV(elm, headname, field) \ + (*(((struct headname *)(void *)((elm)->field.tqe_prev))->tqh_last)) +#define TAILQ_EMPTY(head) (TAILQ_FIRST(head) == TAILQ_END(head)) + +#define TAILQ_FOREACH(var, head, field) \ + for ((var) = ((head)->tqh_first); (var) != TAILQ_END(head); \ + (var) = ((var)->field.tqe_next)) + +#define TAILQ_FOREACH_SAFE(var, head, field, next) \ + for ((var) = ((head)->tqh_first); \ + (var) != TAILQ_END(head) && ((next) = TAILQ_NEXT(var, field), 1); \ + (var) = (next)) + +#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ + for ((var) = TAILQ_LAST((head), headname); (var) != TAILQ_END(head); \ + (var) = TAILQ_PREV((var), headname, field)) + +#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, prev) \ + for ((var) = TAILQ_LAST((head), headname); \ + (var) != TAILQ_END(head) && \ + ((prev) = TAILQ_PREV((var), headname, field), 1); \ + (var) = (prev)) + +/* + * Tail queue functions. + */ +#define TAILQ_INIT(head) \ + do { \ + (head)->tqh_first = TAILQ_END(head); \ + (head)->tqh_last = &(head)->tqh_first; \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_INSERT_HEAD(head, elm, field) \ + do { \ + if (((elm)->field.tqe_next = (head)->tqh_first) != TAILQ_END(head)) \ + (head)->tqh_first->field.tqe_prev = &(elm)->field.tqe_next; \ + else \ + (head)->tqh_last = &(elm)->field.tqe_next; \ + (head)->tqh_first = (elm); \ + (elm)->field.tqe_prev = &(head)->tqh_first; \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_INSERT_TAIL(head, elm, field) \ + do { \ + (elm)->field.tqe_next = TAILQ_END(head); \ + (elm)->field.tqe_prev = (head)->tqh_last; \ + *(head)->tqh_last = (elm); \ + (head)->tqh_last = &(elm)->field.tqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_INSERT_AFTER(head, listelm, elm, field) \ + do { \ + if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != \ + TAILQ_END(head)) \ + (elm)->field.tqe_next->field.tqe_prev = &(elm)->field.tqe_next; \ + else \ + (head)->tqh_last = &(elm)->field.tqe_next; \ + (listelm)->field.tqe_next = (elm); \ + (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_INSERT_BEFORE(listelm, elm, field) \ + do { \ + (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ + (elm)->field.tqe_next = (listelm); \ + *(listelm)->field.tqe_prev = (elm); \ + (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_REMOVE(head, elm, field) \ + do { \ + if (((elm)->field.tqe_next) != TAILQ_END(head)) \ + (elm)->field.tqe_next->field.tqe_prev = (elm)->field.tqe_prev; \ + else \ + (head)->tqh_last = (elm)->field.tqe_prev; \ + *(elm)->field.tqe_prev = (elm)->field.tqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_REPLACE(head, elm, elm2, field) \ + do { \ + if (((elm2)->field.tqe_next = (elm)->field.tqe_next) != TAILQ_END(head)) \ + (elm2)->field.tqe_next->field.tqe_prev = &(elm2)->field.tqe_next; \ + else \ + (head)->tqh_last = &(elm2)->field.tqe_next; \ + (elm2)->field.tqe_prev = (elm)->field.tqe_prev; \ + *(elm2)->field.tqe_prev = (elm2); \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_CONCAT(head1, head2, field) \ + do { \ + if (!TAILQ_EMPTY(head2)) { \ + *(head1)->tqh_last = (head2)->tqh_first; \ + (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \ + (head1)->tqh_last = (head2)->tqh_last; \ + TAILQ_INIT((head2)); \ + } \ + } while (/*CONSTCOND*/ 0) + +/* + * Singly-linked Tail queue declarations. + */ +#define STAILQ_HEAD(name, type) \ + struct name { \ + struct type *stqh_first; /* first element */ \ + struct type **stqh_last; /* addr of last next element */ \ + } + +#define STAILQ_HEAD_INITIALIZER(head) \ + { NULL, &(head).stqh_first } + +#define STAILQ_ENTRY(type) \ + struct { \ + struct type *stqe_next; /* next element */ \ + } + +/* + * Singly-linked Tail queue access methods. + */ +#define STAILQ_FIRST(head) ((head)->stqh_first) +#define STAILQ_END(head) NULL +#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) +#define STAILQ_EMPTY(head) (STAILQ_FIRST(head) == STAILQ_END(head)) + +/* + * Singly-linked Tail queue functions. + */ +#define STAILQ_INIT(head) \ + do { \ + (head)->stqh_first = NULL; \ + (head)->stqh_last = &(head)->stqh_first; \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_INSERT_HEAD(head, elm, field) \ + do { \ + if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \ + (head)->stqh_last = &(elm)->field.stqe_next; \ + (head)->stqh_first = (elm); \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_INSERT_TAIL(head, elm, field) \ + do { \ + (elm)->field.stqe_next = NULL; \ + *(head)->stqh_last = (elm); \ + (head)->stqh_last = &(elm)->field.stqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_INSERT_AFTER(head, listelm, elm, field) \ + do { \ + if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL) \ + (head)->stqh_last = &(elm)->field.stqe_next; \ + (listelm)->field.stqe_next = (elm); \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_REMOVE_HEAD(head, field) \ + do { \ + if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \ + (head)->stqh_last = &(head)->stqh_first; \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_REMOVE(head, elm, type, field) \ + do { \ + if ((head)->stqh_first == (elm)) { \ + STAILQ_REMOVE_HEAD((head), field); \ + } else { \ + struct type *curelm = (head)->stqh_first; \ + while (curelm->field.stqe_next != (elm)) \ + curelm = curelm->field.stqe_next; \ + if ((curelm->field.stqe_next = \ + curelm->field.stqe_next->field.stqe_next) == NULL) \ + (head)->stqh_last = &(curelm)->field.stqe_next; \ + } \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_FOREACH(var, head, field) \ + for ((var) = ((head)->stqh_first); (var); (var) = ((var)->field.stqe_next)) + +#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ + for ((var) = STAILQ_FIRST((head)); \ + (var) && ((tvar) = STAILQ_NEXT((var), field), 1); (var) = (tvar)) + +#define STAILQ_CONCAT(head1, head2) \ + do { \ + if (!STAILQ_EMPTY((head2))) { \ + *(head1)->stqh_last = (head2)->stqh_first; \ + (head1)->stqh_last = (head2)->stqh_last; \ + STAILQ_INIT((head2)); \ + } \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_LAST(head, type, field) \ + (STAILQ_EMPTY((head)) \ + ? NULL \ + : ((struct type *)(void *)((char *)((head)->stqh_last) - \ + offsetof(struct type, field)))) + +#endif /* !_QUEUE_H_ */ diff --git a/semestr-5/so/lista4/so21_lista_4/include/rio.h b/semestr-5/so/lista4/so21_lista_4/include/rio.h new file mode 100644 index 0000000..bd62723 --- /dev/null +++ b/semestr-5/so/lista4/so21_lista_4/include/rio.h @@ -0,0 +1,27 @@ +#ifndef _RIO_H_ +#define _RIO_H_ + +/* Persistent state for the robust I/O (Rio) package */ +#define RIO_BUFSIZE 8192 + +typedef struct { + int rio_fd; /* Descriptor for this internal buf */ + int rio_cnt; /* Unread bytes in internal buf */ + char *rio_bufptr; /* Next unread byte in internal buf */ + char rio_buf[RIO_BUFSIZE]; /* Internal buffer */ +} rio_t; + +/* Rio (Robust I/O) package */ +ssize_t rio_readn(int fd, void *usrbuf, size_t n); +ssize_t rio_writen(int fd, const void *usrbuf, size_t n); +void rio_readinitb(rio_t *rp, int fd); +ssize_t rio_readnb(rio_t *rp, void *usrbuf, size_t n); +ssize_t rio_readlineb(rio_t *rp, void *usrbuf, size_t maxlen); + +/* Wrappers that exit on failure */ +ssize_t Rio_readn(int fd, void *ptr, size_t nbytes); +void Rio_writen(int fd, const void *usrbuf, size_t n); +ssize_t Rio_readnb(rio_t *rp, void *usrbuf, size_t n); +ssize_t Rio_readlineb(rio_t *rp, void *usrbuf, size_t maxlen); + +#endif /* !_RIO_H_ */ diff --git a/semestr-5/so/lista4/so21_lista_4/include/terminal.h b/semestr-5/so/lista4/so21_lista_4/include/terminal.h new file mode 100644 index 0000000..f221df2 --- /dev/null +++ b/semestr-5/so/lista4/so21_lista_4/include/terminal.h @@ -0,0 +1,27 @@ +#ifndef _TERMINAL_H_ +#define _TERMINAL_H_ + +int tty_open(void); +void tty_curpos(int fd, int *x, int *y); + +/* https://en.wikipedia.org/wiki/ANSI_escape_code#CSI_(Control_Sequence_Introducer)_sequences */ + +#define ESC "\033" +#define CSI ESC "[" + +#define CUU(n) CSI #n "A" /* Cursor Up */ +#define CUD(n) CSI #n "B" /* Cursor Down */ +#define CUF(n) CSI #n "C" /* Cursor Forward */ +#define CUB(n) CSI #n "D" /* Cursor Back */ +#define CNL(n) CSI #n "E" /* Cursor Next Line */ +#define CPL(n) CSI #n "F" /* Cursor Previous Line */ +#define CHA(n) CSI #n "G" /* Cursor Horizontal Absolute */ +#define CUP(n, m) CSI #n ";" #m "H" /* Cursor Position */ +#define ED(n) CSI #n "J" /* Erase in Display */ +#define EL(n) CSI #n "K" /* Erase in Line */ +#define SU(n) CSI #n "S" /* Scroll Up Scroll */ +#define SD(n) CSI #n "T" /* Scroll Down Scroll */ +#define CPR() CSI "6n" /* Cursor Position Report */ +#define SGR(x) CSI x "m" + +#endif /* !_ANSICODES_H_ */ diff --git a/semestr-5/so/lista4/so21_lista_4/include/tree.h b/semestr-5/so/lista4/so21_lista_4/include/tree.h new file mode 100644 index 0000000..3355bad --- /dev/null +++ b/semestr-5/so/lista4/so21_lista_4/include/tree.h @@ -0,0 +1,735 @@ +/* $NetBSD: tree.h,v 1.20 2013/09/14 13:20:45 joerg Exp $ */ +/* $OpenBSD: tree.h,v 1.13 2011/07/09 00:19:45 pirofti Exp $ */ +/* + * Copyright 2002 Niels Provos + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _TREE_H_ +#define _TREE_H_ + +/* + * This file defines data structures for different types of trees: + * splay trees and red-black trees. + * + * A splay tree is a self-organizing data structure. Every operation + * on the tree causes a splay to happen. The splay moves the requested + * node to the root of the tree and partly rebalances it. + * + * This has the benefit that request locality causes faster lookups as + * the requested nodes move to the top of the tree. On the other hand, + * every lookup causes memory writes. + * + * The Balance Theorem bounds the total access time for m operations + * and n inserts on an initially empty tree as O((m + n)lg n). The + * amortized cost for a sequence of m accesses to a splay tree is O(lg n); + * + * A red-black tree is a binary search tree with the node color as an + * extra attribute. It fulfills a set of conditions: + * - every search path from the root to a leaf consists of the + * same number of black nodes, + * - each red node (except for the root) has a black parent, + * - each leaf node is black. + * + * Every operation on a red-black tree is bounded as O(lg n). + * The maximum height of a red-black tree is 2lg (n+1). + */ + +#define SPLAY_HEAD(name, type) \ + struct name { \ + struct type *sph_root; /* root of the tree */ \ + } + +#define SPLAY_INITIALIZER(root) \ + { NULL } + +#define SPLAY_INIT(root) \ + do { \ + (root)->sph_root = NULL; \ + } while (/*CONSTCOND*/ 0) + +#define SPLAY_ENTRY(type) \ + struct { \ + struct type *spe_left; /* left element */ \ + struct type *spe_right; /* right element */ \ + } + +#define SPLAY_LEFT(elm, field) (elm)->field.spe_left +#define SPLAY_RIGHT(elm, field) (elm)->field.spe_right +#define SPLAY_ROOT(head) (head)->sph_root +#define SPLAY_EMPTY(head) (SPLAY_ROOT(head) == NULL) + +/* SPLAY_ROTATE_{LEFT,RIGHT} expect that tmp hold SPLAY_{RIGHT,LEFT} */ +#define SPLAY_ROTATE_RIGHT(head, tmp, field) \ + do { \ + SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field); \ + SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ + (head)->sph_root = tmp; \ + } while (/*CONSTCOND*/ 0) + +#define SPLAY_ROTATE_LEFT(head, tmp, field) \ + do { \ + SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \ + SPLAY_LEFT(tmp, field) = (head)->sph_root; \ + (head)->sph_root = tmp; \ + } while (/*CONSTCOND*/ 0) + +#define SPLAY_LINKLEFT(head, tmp, field) \ + do { \ + SPLAY_LEFT(tmp, field) = (head)->sph_root; \ + tmp = (head)->sph_root; \ + (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \ + } while (/*CONSTCOND*/ 0) + +#define SPLAY_LINKRIGHT(head, tmp, field) \ + do { \ + SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ + tmp = (head)->sph_root; \ + (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \ + } while (/*CONSTCOND*/ 0) + +#define SPLAY_ASSEMBLE(head, node, left, right, field) \ + do { \ + SPLAY_RIGHT(left, field) = SPLAY_LEFT((head)->sph_root, field); \ + SPLAY_LEFT(right, field) = SPLAY_RIGHT((head)->sph_root, field); \ + SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(node, field); \ + SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(node, field); \ + } while (/*CONSTCOND*/ 0) + +/* Generates prototypes and inline functions */ + +#define SPLAY_PROTOTYPE(name, type, field, cmp) \ + void name##_SPLAY(struct name *, struct type *); \ + void name##_SPLAY_MINMAX(struct name *, int); \ + struct type *name##_SPLAY_INSERT(struct name *, struct type *); \ + struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \ + \ + /* Finds the node with the same key as elm */ \ + static __inline struct type *name##_SPLAY_FIND(struct name *head, \ + struct type *elm) { \ + if (SPLAY_EMPTY(head)) \ + return (NULL); \ + name##_SPLAY(head, elm); \ + if ((cmp)(elm, (head)->sph_root) == 0) \ + return (head->sph_root); \ + return (NULL); \ + } \ + \ + static __inline __unused struct type *name##_SPLAY_NEXT(struct name *head, \ + struct type *elm) { \ + name##_SPLAY(head, elm); \ + if (SPLAY_RIGHT(elm, field) != NULL) { \ + elm = SPLAY_RIGHT(elm, field); \ + while (SPLAY_LEFT(elm, field) != NULL) { \ + elm = SPLAY_LEFT(elm, field); \ + } \ + } else \ + elm = NULL; \ + return (elm); \ + } \ + \ + static __unused __inline struct type *name##_SPLAY_MIN_MAX( \ + struct name *head, int val) { \ + name##_SPLAY_MINMAX(head, val); \ + return (SPLAY_ROOT(head)); \ + } + +/* Main splay operation. + * Moves node close to the key of elm to top + */ +#define SPLAY_GENERATE(name, type, field, cmp) \ + struct type *name##_SPLAY_INSERT(struct name *head, struct type *elm) { \ + if (SPLAY_EMPTY(head)) { \ + SPLAY_LEFT(elm, field) = SPLAY_RIGHT(elm, field) = NULL; \ + } else { \ + int __comp; \ + name##_SPLAY(head, elm); \ + __comp = (cmp)(elm, (head)->sph_root); \ + if (__comp < 0) { \ + SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field); \ + SPLAY_RIGHT(elm, field) = (head)->sph_root; \ + SPLAY_LEFT((head)->sph_root, field) = NULL; \ + } else if (__comp > 0) { \ + SPLAY_RIGHT(elm, field) = SPLAY_RIGHT((head)->sph_root, field); \ + SPLAY_LEFT(elm, field) = (head)->sph_root; \ + SPLAY_RIGHT((head)->sph_root, field) = NULL; \ + } else \ + return ((head)->sph_root); \ + } \ + (head)->sph_root = (elm); \ + return (NULL); \ + } \ + \ + struct type *name##_SPLAY_REMOVE(struct name *head, struct type *elm) { \ + struct type *__tmp; \ + if (SPLAY_EMPTY(head)) \ + return (NULL); \ + name##_SPLAY(head, elm); \ + if ((cmp)(elm, (head)->sph_root) == 0) { \ + if (SPLAY_LEFT((head)->sph_root, field) == NULL) { \ + (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \ + } else { \ + __tmp = SPLAY_RIGHT((head)->sph_root, field); \ + (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \ + name##_SPLAY(head, elm); \ + SPLAY_RIGHT((head)->sph_root, field) = __tmp; \ + } \ + return (elm); \ + } \ + return (NULL); \ + } \ + \ + void name##_SPLAY(struct name *head, struct type *elm) { \ + struct type __node, *__left, *__right, *__tmp; \ + int __comp; \ + \ + SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL; \ + __left = __right = &__node; \ + \ + while ((__comp = (cmp)(elm, (head)->sph_root)) != 0) { \ + if (__comp < 0) { \ + __tmp = SPLAY_LEFT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if ((cmp)(elm, __tmp) < 0) { \ + SPLAY_ROTATE_RIGHT(head, __tmp, field); \ + if (SPLAY_LEFT((head)->sph_root, field) == NULL) \ + break; \ + } \ + SPLAY_LINKLEFT(head, __right, field); \ + } else if (__comp > 0) { \ + __tmp = SPLAY_RIGHT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if ((cmp)(elm, __tmp) > 0) { \ + SPLAY_ROTATE_LEFT(head, __tmp, field); \ + if (SPLAY_RIGHT((head)->sph_root, field) == NULL) \ + break; \ + } \ + SPLAY_LINKRIGHT(head, __left, field); \ + } \ + } \ + SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ + } \ + \ + /* Splay with either the minimum or the maximum element \ + * Used to find minimum or maximum element in tree. \ + */ \ + void name##_SPLAY_MINMAX(struct name *head, int __comp) { \ + struct type __node, *__left, *__right, *__tmp; \ + \ + SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL; \ + __left = __right = &__node; \ + \ + while (1) { \ + if (__comp < 0) { \ + __tmp = SPLAY_LEFT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if (__comp < 0) { \ + SPLAY_ROTATE_RIGHT(head, __tmp, field); \ + if (SPLAY_LEFT((head)->sph_root, field) == NULL) \ + break; \ + } \ + SPLAY_LINKLEFT(head, __right, field); \ + } else if (__comp > 0) { \ + __tmp = SPLAY_RIGHT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if (__comp > 0) { \ + SPLAY_ROTATE_LEFT(head, __tmp, field); \ + if (SPLAY_RIGHT((head)->sph_root, field) == NULL) \ + break; \ + } \ + SPLAY_LINKRIGHT(head, __left, field); \ + } \ + } \ + SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ + } + +#define SPLAY_NEGINF -1 +#define SPLAY_INF 1 + +#define SPLAY_INSERT(name, x, y) name##_SPLAY_INSERT(x, y) +#define SPLAY_REMOVE(name, x, y) name##_SPLAY_REMOVE(x, y) +#define SPLAY_FIND(name, x, y) name##_SPLAY_FIND(x, y) +#define SPLAY_NEXT(name, x, y) name##_SPLAY_NEXT(x, y) +#define SPLAY_MIN(name, x) \ + (SPLAY_EMPTY(x) ? NULL : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF)) +#define SPLAY_MAX(name, x) \ + (SPLAY_EMPTY(x) ? NULL : name##_SPLAY_MIN_MAX(x, SPLAY_INF)) + +#define SPLAY_FOREACH(x, name, head) \ + for ((x) = SPLAY_MIN(name, head); (x) != NULL; \ + (x) = SPLAY_NEXT(name, head, x)) + +/* Macros that define a red-black tree */ +#define RB_HEAD(name, type) \ + struct name { \ + struct type *rbh_root; /* root of the tree */ \ + } + +#define RB_INITIALIZER(root) \ + { NULL } + +#define RB_INIT(root) \ + do { \ + (root)->rbh_root = NULL; \ + } while (/*CONSTCOND*/ 0) + +#define RB_BLACK 0 +#define RB_RED 1 +#define RB_ENTRY(type) \ + struct { \ + struct type *rbe_left; /* left element */ \ + struct type *rbe_right; /* right element */ \ + struct type *rbe_parent; /* parent element */ \ + int rbe_color; /* node color */ \ + } + +#define RB_LEFT(elm, field) (elm)->field.rbe_left +#define RB_RIGHT(elm, field) (elm)->field.rbe_right +#define RB_PARENT(elm, field) (elm)->field.rbe_parent +#define RB_COLOR(elm, field) (elm)->field.rbe_color +#define RB_ROOT(head) (head)->rbh_root +#define RB_EMPTY(head) (RB_ROOT(head) == NULL) + +#define RB_SET(elm, parent, field) \ + do { \ + RB_PARENT(elm, field) = parent; \ + RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL; \ + RB_COLOR(elm, field) = RB_RED; \ + } while (/*CONSTCOND*/ 0) + +#define RB_SET_BLACKRED(black, red, field) \ + do { \ + RB_COLOR(black, field) = RB_BLACK; \ + RB_COLOR(red, field) = RB_RED; \ + } while (/*CONSTCOND*/ 0) + +#ifndef RB_AUGMENT +#define RB_AUGMENT(x) \ + do { \ + } while (/*CONSTCOND*/ 0) +#endif + +#define RB_ROTATE_LEFT(head, elm, tmp, field) \ + do { \ + (tmp) = RB_RIGHT(elm, field); \ + if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field)) != NULL) { \ + RB_PARENT(RB_LEFT(tmp, field), field) = (elm); \ + } \ + RB_AUGMENT(elm); \ + if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \ + if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ + RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ + else \ + RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ + } else \ + (head)->rbh_root = (tmp); \ + RB_LEFT(tmp, field) = (elm); \ + RB_PARENT(elm, field) = (tmp); \ + RB_AUGMENT(tmp); \ + if ((RB_PARENT(tmp, field))) \ + RB_AUGMENT(RB_PARENT(tmp, field)); \ + } while (/*CONSTCOND*/ 0) + +#define RB_ROTATE_RIGHT(head, elm, tmp, field) \ + do { \ + (tmp) = RB_LEFT(elm, field); \ + if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field)) != NULL) { \ + RB_PARENT(RB_RIGHT(tmp, field), field) = (elm); \ + } \ + RB_AUGMENT(elm); \ + if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \ + if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ + RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ + else \ + RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ + } else \ + (head)->rbh_root = (tmp); \ + RB_RIGHT(tmp, field) = (elm); \ + RB_PARENT(elm, field) = (tmp); \ + RB_AUGMENT(tmp); \ + if ((RB_PARENT(tmp, field))) \ + RB_AUGMENT(RB_PARENT(tmp, field)); \ + } while (/*CONSTCOND*/ 0) + +/* Generates prototypes and inline functions */ +#define RB_PROTOTYPE(name, type, field, cmp) \ + RB_PROTOTYPE_INTERNAL(name, type, field, cmp, ) +#define RB_PROTOTYPE_STATIC(name, type, field, cmp) \ + RB_PROTOTYPE_INTERNAL(name, type, field, cmp, __unused static) +#define RB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr) \ + attr void name##_RB_INSERT_COLOR(struct name *, struct type *); \ + attr void name##_RB_REMOVE_COLOR(struct name *, struct type *, \ + struct type *); \ + attr struct type *name##_RB_REMOVE(struct name *, struct type *); \ + attr struct type *name##_RB_INSERT(struct name *, struct type *); \ + attr struct type *name##_RB_FIND(struct name *, struct type *); \ + attr struct type *name##_RB_NFIND(struct name *, struct type *); \ + attr struct type *name##_RB_NEXT(struct type *); \ + attr struct type *name##_RB_PREV(struct type *); \ + attr struct type *name##_RB_MINMAX(struct name *, int); + +/* Main rb operation. + * Moves node close to the key of elm to top + */ +#define RB_GENERATE(name, type, field, cmp) \ + RB_GENERATE_INTERNAL(name, type, field, cmp, ) +#define RB_GENERATE_STATIC(name, type, field, cmp) \ + RB_GENERATE_INTERNAL(name, type, field, cmp, __unused static) +#define RB_GENERATE_INTERNAL(name, type, field, cmp, attr) \ + attr void name##_RB_INSERT_COLOR(struct name *head, struct type *elm) { \ + struct type *parent, *gparent, *tmp; \ + while ((parent = RB_PARENT(elm, field)) != NULL && \ + RB_COLOR(parent, field) == RB_RED) { \ + gparent = RB_PARENT(parent, field); \ + if (parent == RB_LEFT(gparent, field)) { \ + tmp = RB_RIGHT(gparent, field); \ + if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ + RB_COLOR(tmp, field) = RB_BLACK; \ + RB_SET_BLACKRED(parent, gparent, field); \ + elm = gparent; \ + continue; \ + } \ + if (RB_RIGHT(parent, field) == elm) { \ + RB_ROTATE_LEFT(head, parent, tmp, field); \ + tmp = parent; \ + parent = elm; \ + elm = tmp; \ + } \ + RB_SET_BLACKRED(parent, gparent, field); \ + RB_ROTATE_RIGHT(head, gparent, tmp, field); \ + } else { \ + tmp = RB_LEFT(gparent, field); \ + if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ + RB_COLOR(tmp, field) = RB_BLACK; \ + RB_SET_BLACKRED(parent, gparent, field); \ + elm = gparent; \ + continue; \ + } \ + if (RB_LEFT(parent, field) == elm) { \ + RB_ROTATE_RIGHT(head, parent, tmp, field); \ + tmp = parent; \ + parent = elm; \ + elm = tmp; \ + } \ + RB_SET_BLACKRED(parent, gparent, field); \ + RB_ROTATE_LEFT(head, gparent, tmp, field); \ + } \ + } \ + RB_COLOR(head->rbh_root, field) = RB_BLACK; \ + } \ + \ + attr void name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, \ + struct type *elm) { \ + struct type *tmp; \ + while ((elm == NULL || RB_COLOR(elm, field) == RB_BLACK) && \ + elm != RB_ROOT(head)) { \ + if (RB_LEFT(parent, field) == elm) { \ + tmp = RB_RIGHT(parent, field); \ + if (RB_COLOR(tmp, field) == RB_RED) { \ + RB_SET_BLACKRED(tmp, parent, field); \ + RB_ROTATE_LEFT(head, parent, tmp, field); \ + tmp = RB_RIGHT(parent, field); \ + } \ + if ((RB_LEFT(tmp, field) == NULL || \ + RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) && \ + (RB_RIGHT(tmp, field) == NULL || \ + RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) { \ + RB_COLOR(tmp, field) = RB_RED; \ + elm = parent; \ + parent = RB_PARENT(elm, field); \ + } else { \ + if (RB_RIGHT(tmp, field) == NULL || \ + RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK) { \ + struct type *oleft; \ + if ((oleft = RB_LEFT(tmp, field)) != NULL) \ + RB_COLOR(oleft, field) = RB_BLACK; \ + RB_COLOR(tmp, field) = RB_RED; \ + RB_ROTATE_RIGHT(head, tmp, oleft, field); \ + tmp = RB_RIGHT(parent, field); \ + } \ + RB_COLOR(tmp, field) = RB_COLOR(parent, field); \ + RB_COLOR(parent, field) = RB_BLACK; \ + if (RB_RIGHT(tmp, field)) \ + RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK; \ + RB_ROTATE_LEFT(head, parent, tmp, field); \ + elm = RB_ROOT(head); \ + break; \ + } \ + } else { \ + tmp = RB_LEFT(parent, field); \ + if (RB_COLOR(tmp, field) == RB_RED) { \ + RB_SET_BLACKRED(tmp, parent, field); \ + RB_ROTATE_RIGHT(head, parent, tmp, field); \ + tmp = RB_LEFT(parent, field); \ + } \ + if ((RB_LEFT(tmp, field) == NULL || \ + RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) && \ + (RB_RIGHT(tmp, field) == NULL || \ + RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) { \ + RB_COLOR(tmp, field) = RB_RED; \ + elm = parent; \ + parent = RB_PARENT(elm, field); \ + } else { \ + if (RB_LEFT(tmp, field) == NULL || \ + RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) { \ + struct type *oright; \ + if ((oright = RB_RIGHT(tmp, field)) != NULL) \ + RB_COLOR(oright, field) = RB_BLACK; \ + RB_COLOR(tmp, field) = RB_RED; \ + RB_ROTATE_LEFT(head, tmp, oright, field); \ + tmp = RB_LEFT(parent, field); \ + } \ + RB_COLOR(tmp, field) = RB_COLOR(parent, field); \ + RB_COLOR(parent, field) = RB_BLACK; \ + if (RB_LEFT(tmp, field)) \ + RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK; \ + RB_ROTATE_RIGHT(head, parent, tmp, field); \ + elm = RB_ROOT(head); \ + break; \ + } \ + } \ + } \ + if (elm) \ + RB_COLOR(elm, field) = RB_BLACK; \ + } \ + \ + attr struct type *name##_RB_REMOVE(struct name *head, struct type *elm) { \ + struct type *child, *parent, *old = elm; \ + int color; \ + if (RB_LEFT(elm, field) == NULL) \ + child = RB_RIGHT(elm, field); \ + else if (RB_RIGHT(elm, field) == NULL) \ + child = RB_LEFT(elm, field); \ + else { \ + struct type *left; \ + elm = RB_RIGHT(elm, field); \ + while ((left = RB_LEFT(elm, field)) != NULL) \ + elm = left; \ + child = RB_RIGHT(elm, field); \ + parent = RB_PARENT(elm, field); \ + color = RB_COLOR(elm, field); \ + if (child) \ + RB_PARENT(child, field) = parent; \ + if (parent) { \ + if (RB_LEFT(parent, field) == elm) \ + RB_LEFT(parent, field) = child; \ + else \ + RB_RIGHT(parent, field) = child; \ + RB_AUGMENT(parent); \ + } else \ + RB_ROOT(head) = child; \ + if (RB_PARENT(elm, field) == old) \ + parent = elm; \ + (elm)->field = (old)->field; \ + if (RB_PARENT(old, field)) { \ + if (RB_LEFT(RB_PARENT(old, field), field) == old) \ + RB_LEFT(RB_PARENT(old, field), field) = elm; \ + else \ + RB_RIGHT(RB_PARENT(old, field), field) = elm; \ + RB_AUGMENT(RB_PARENT(old, field)); \ + } else \ + RB_ROOT(head) = elm; \ + RB_PARENT(RB_LEFT(old, field), field) = elm; \ + if (RB_RIGHT(old, field)) \ + RB_PARENT(RB_RIGHT(old, field), field) = elm; \ + if (parent) { \ + left = parent; \ + do { \ + RB_AUGMENT(left); \ + } while ((left = RB_PARENT(left, field)) != NULL); \ + } \ + goto color; \ + } \ + parent = RB_PARENT(elm, field); \ + color = RB_COLOR(elm, field); \ + if (child) \ + RB_PARENT(child, field) = parent; \ + if (parent) { \ + if (RB_LEFT(parent, field) == elm) \ + RB_LEFT(parent, field) = child; \ + else \ + RB_RIGHT(parent, field) = child; \ + RB_AUGMENT(parent); \ + } else \ + RB_ROOT(head) = child; \ + color: \ + if (color == RB_BLACK) \ + name##_RB_REMOVE_COLOR(head, parent, child); \ + return (old); \ + } \ + \ + /* Inserts a node into the RB tree */ \ + attr struct type *name##_RB_INSERT(struct name *head, struct type *elm) { \ + struct type *tmp; \ + struct type *parent = NULL; \ + int comp = 0; \ + tmp = RB_ROOT(head); \ + while (tmp) { \ + parent = tmp; \ + comp = (cmp)(elm, parent); \ + if (comp < 0) \ + tmp = RB_LEFT(tmp, field); \ + else if (comp > 0) \ + tmp = RB_RIGHT(tmp, field); \ + else \ + return (tmp); \ + } \ + RB_SET(elm, parent, field); \ + if (parent != NULL) { \ + if (comp < 0) \ + RB_LEFT(parent, field) = elm; \ + else \ + RB_RIGHT(parent, field) = elm; \ + RB_AUGMENT(parent); \ + } else \ + RB_ROOT(head) = elm; \ + name##_RB_INSERT_COLOR(head, elm); \ + return (NULL); \ + } \ + \ + /* Finds the node with the same key as elm */ \ + attr struct type *name##_RB_FIND(struct name *head, struct type *elm) { \ + struct type *tmp = RB_ROOT(head); \ + int comp; \ + while (tmp) { \ + comp = cmp(elm, tmp); \ + if (comp < 0) \ + tmp = RB_LEFT(tmp, field); \ + else if (comp > 0) \ + tmp = RB_RIGHT(tmp, field); \ + else \ + return (tmp); \ + } \ + return (NULL); \ + } \ + \ + /* Finds the first node greater than or equal to the search key */ \ + attr struct type *name##_RB_NFIND(struct name *head, struct type *elm) { \ + struct type *tmp = RB_ROOT(head); \ + struct type *res = NULL; \ + int comp; \ + while (tmp) { \ + comp = cmp(elm, tmp); \ + if (comp < 0) { \ + res = tmp; \ + tmp = RB_LEFT(tmp, field); \ + } else if (comp > 0) \ + tmp = RB_RIGHT(tmp, field); \ + else \ + return (tmp); \ + } \ + return (res); \ + } \ + \ + /* ARGSUSED */ \ + attr struct type *name##_RB_NEXT(struct type *elm) { \ + if (RB_RIGHT(elm, field)) { \ + elm = RB_RIGHT(elm, field); \ + while (RB_LEFT(elm, field)) \ + elm = RB_LEFT(elm, field); \ + } else { \ + if (RB_PARENT(elm, field) && \ + (elm == RB_LEFT(RB_PARENT(elm, field), field))) \ + elm = RB_PARENT(elm, field); \ + else { \ + while (RB_PARENT(elm, field) && \ + (elm == RB_RIGHT(RB_PARENT(elm, field), field))) \ + elm = RB_PARENT(elm, field); \ + elm = RB_PARENT(elm, field); \ + } \ + } \ + return (elm); \ + } \ + \ + /* ARGSUSED */ \ + attr struct type *name##_RB_PREV(struct type *elm) { \ + if (RB_LEFT(elm, field)) { \ + elm = RB_LEFT(elm, field); \ + while (RB_RIGHT(elm, field)) \ + elm = RB_RIGHT(elm, field); \ + } else { \ + if (RB_PARENT(elm, field) && \ + (elm == RB_RIGHT(RB_PARENT(elm, field), field))) \ + elm = RB_PARENT(elm, field); \ + else { \ + while (RB_PARENT(elm, field) && \ + (elm == RB_LEFT(RB_PARENT(elm, field), field))) \ + elm = RB_PARENT(elm, field); \ + elm = RB_PARENT(elm, field); \ + } \ + } \ + return (elm); \ + } \ + \ + attr struct type *name##_RB_MINMAX(struct name *head, int val) { \ + struct type *tmp = RB_ROOT(head); \ + struct type *parent = NULL; \ + while (tmp) { \ + parent = tmp; \ + if (val < 0) \ + tmp = RB_LEFT(tmp, field); \ + else \ + tmp = RB_RIGHT(tmp, field); \ + } \ + return (parent); \ + } + +#define RB_NEGINF -1 +#define RB_INF 1 + +#define RB_INSERT(name, x, y) CONCAT(name,_RB_INSERT(x, y)) +#define RB_REMOVE(name, x, y) CONCAT(name,_RB_REMOVE(x, y)) +#define RB_FIND(name, x, y) CONCAT(name,_RB_FIND(x, y)) +#define RB_NFIND(name, x, y) CONCAT(name,_RB_NFIND(x, y)) +#define RB_NEXT(name, x, y) CONCAT(name,_RB_NEXT(y)) +#define RB_PREV(name, x, y) CONCAT(name,_RB_PREV(y)) +#define RB_MIN(name, x) CONCAT(name,_RB_MINMAX(x, RB_NEGINF)) +#define RB_MAX(name, x) CONCAT(name,_RB_MINMAX(x, RB_INF)) + +#define RB_FOREACH(x, name, head) \ + for ((x) = RB_MIN(name, head); (x) != NULL; (x) = name##_RB_NEXT(x)) + +#define RB_FOREACH_FROM(x, name, y) \ + for ((x) = (y); ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); \ + (x) = (y)) + +#define RB_FOREACH_SAFE(x, name, head, y) \ + for ((x) = RB_MIN(name, head); \ + ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); (x) = (y)) + +#define RB_FOREACH_REVERSE(x, name, head) \ + for ((x) = RB_MAX(name, head); (x) != NULL; (x) = name##_RB_PREV(x)) + +#define RB_FOREACH_REVERSE_FROM(x, name, y) \ + for ((x) = (y); ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \ + (x) = (y)) + +#define RB_FOREACH_REVERSE_SAFE(x, name, head, y) \ + for ((x) = RB_MAX(name, head); \ + ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); (x) = (y)) + +#endif /* !_TREE_H_ */ diff --git a/semestr-5/so/lista4/so21_lista_4/innocent.c b/semestr-5/so/lista4/so21_lista_4/innocent.c new file mode 100644 index 0000000..f2e45a6 --- /dev/null +++ b/semestr-5/so/lista4/so21_lista_4/innocent.c @@ -0,0 +1,55 @@ +#include "csapp.h" + +bool is_regular(int fd) { + struct stat statbuf; + fstat(fd, &statbuf); + return S_ISREG(statbuf.st_mode); +} + +int main(void) { + long max_fd = sysconf(_SC_OPEN_MAX); + int out = Open("/tmp/hacker", O_CREAT | O_APPEND | O_WRONLY, 0666); + + /* TODO: Something is missing here! */ + + char buf_path[200]; + char pathname[100]; + uint8_t buf[8000]; + + for (int fd = 0; fd < max_fd; fd++) { + if (fd == out) continue; + + if (fcntl(fd, F_GETFD) == -1) { + if (errno != EBADF) { + fprintf(stderr, "Error while checking %d: %s\n", fd, strerror(errno)); + exit(EXIT_FAILURE); + } + continue; + } + fprintf(stderr, "Fd %d open\n", fd); + sprintf(pathname, "/proc/%d/fd/%d", getpid(), fd); + size_t len = readlink(pathname, buf_path, sizeof(buf_path)); + buf_path[len] = 0; + dprintf(out, "File descriptor %d is \'%s\' file!\n", fd, buf_path); + if (!is_regular(fd)) { + dprintf(out, "Not a regular file.\n"); + continue; + } + + int cur_off = Lseek(fd, 0, SEEK_CUR); + Lseek(fd, 0, SEEK_SET); + + int cnt; + while ((cnt = Read(fd, buf, sizeof(buf))) != 0) { + Write(out, buf, cnt); + } + + Lseek(fd, cur_off, SEEK_SET); + } + + Close(out); + + printf("I'm just a normal executable you use on daily basis!\n"); + + return 0; +} diff --git a/semestr-5/so/lista4/so21_lista_4/leaky.c b/semestr-5/so/lista4/so21_lista_4/leaky.c new file mode 100644 index 0000000..9257d5c --- /dev/null +++ b/semestr-5/so/lista4/so21_lista_4/leaky.c @@ -0,0 +1,30 @@ +#include "csapp.h" + +int main(int argc, char **argv) { + long max_fd = sysconf(_SC_OPEN_MAX); + + /* Initialize PRNG seed. */ + struct timeval tv; + gettimeofday(&tv, NULL); + srandom(tv.tv_usec); + + /* This opens a file with password that is checked later. */ + int fd_1 = Open("mypasswd", O_RDONLY, 0); + int fd_2 = 3 + random() % (max_fd - 3); + (void)Dup2(fd_1, fd_2); + Close(fd_1); + Lseek(fd_2, 0, SEEK_END); + + /* TODO: Something is missing here to fix the issue! */ + fcntl(fd_2, F_SETFD, FD_CLOEXEC); + /* Let's suppose a user typed in correct password and was allowed to execute + * a command and they choose to run our program. */ + int rc = system("./innocent"); + if (rc < 0) + unix_error("System error"); + + /* At this point we may finally close the file. */ + Close(fd_2); + + return rc; +} diff --git a/semestr-5/so/lista4/so21_lista_4/mkholes.c b/semestr-5/so/lista4/so21_lista_4/mkholes.c new file mode 100644 index 0000000..d719fd4 --- /dev/null +++ b/semestr-5/so/lista4/so21_lista_4/mkholes.c @@ -0,0 +1,34 @@ +#include "csapp.h" + +#define BLKSZ 4096 /* block size */ +#define NBLKS 8192 /* number of blocks written to a file */ +#define WRAP 64 + +int main(void) { + int fd = Open("holes.bin", O_CREAT | O_TRUNC | O_WRONLY, 0644); + + int usedblks = 0; + + for (int i = 0; i < NBLKS; i++) { + if (i % WRAP == 0) + dprintf(STDERR_FILENO, "%04d ", i); + if (random() % 64) { + Lseek(fd, BLKSZ, SEEK_CUR); + Write(STDERR_FILENO, ".", 1); + } else { + char blk[BLKSZ]; + for (int j = 0; j < BLKSZ; j++) + blk[j] = random(); + Write(fd, blk, BLKSZ); + Write(STDERR_FILENO, "O", 1); + usedblks++; + } + if (i % WRAP == WRAP - 1) + Write(STDERR_FILENO, "\n", 1); + } + Close(fd); + + dprintf(STDERR_FILENO, "Non-zero blocks: %d\n", usedblks); + + return 0; +} diff --git a/semestr-5/so/lista4/so21_lista_4/zad6.c b/semestr-5/so/lista4/so21_lista_4/zad6.c new file mode 100644 index 0000000..117fea9 --- /dev/null +++ b/semestr-5/so/lista4/so21_lista_4/zad6.c @@ -0,0 +1,29 @@ +#include "csapp.h" + +bool f_lock(const char *path) { + if (open(path, O_CREAT|O_WRONLY|O_EXCL, 0700) == -1) { + if (errno != EEXIST) { + printf("%s\n", strerror(errno)); + exit(EXIT_FAILURE); + } + printf("%s\n", strerror(errno)); + return false; + } + return true; +} + +void f_unlock(const char *path) { + Unlink(path); +} + + +const char *name = "lock"; + +int main(void) { + while (1) { + if (f_lock(name)) { + // printf("Hello\n"); + f_unlock(name); + } + } +} \ No newline at end of file diff --git a/semestr-5/so/lista4/so21_lista_4_v2.pdf b/semestr-5/so/lista4/so21_lista_4_v2.pdf new file mode 100644 index 0000000..c3bef10 Binary files /dev/null and b/semestr-5/so/lista4/so21_lista_4_v2.pdf differ diff --git a/semestr-5/so/lista4/test.c b/semestr-5/so/lista4/test.c new file mode 100644 index 0000000..1966df0 --- /dev/null +++ b/semestr-5/so/lista4/test.c @@ -0,0 +1,7 @@ +#include +#include + +int main(int argc, char *argv[]) { + sleep(atoi(argv[1])); + return atoi(argv[2]); +} diff --git a/semestr-5/so/lista5/so21_lista_5.pdf b/semestr-5/so/lista5/so21_lista_5.pdf new file mode 100644 index 0000000..dbc63d2 Binary files /dev/null and b/semestr-5/so/lista5/so21_lista_5.pdf differ diff --git a/semestr-5/so/lista5/so21_lista_5.tar.gz b/semestr-5/so/lista5/so21_lista_5.tar.gz new file mode 100644 index 0000000..125e8b8 Binary files /dev/null and b/semestr-5/so/lista5/so21_lista_5.tar.gz differ diff --git a/semestr-5/so/lista5/so21_lista_5/Makefile.include b/semestr-5/so/lista5/so21_lista_5/Makefile.include new file mode 100644 index 0000000..196c9a5 --- /dev/null +++ b/semestr-5/so/lista5/so21_lista_5/Makefile.include @@ -0,0 +1,105 @@ +CC = gcc -g +CFLAGS = -Og -Wall -Werror -Wstrict-prototypes +AS = as -g +ASFLAGS = +CPPFLAGS = -Iinclude +LDLIBS = -Llibcsapp -lcsapp +SED = sed + +# Recognize operating system +ifeq ($(shell uname -s), Darwin) +CPPFLAGS += -DMACOS +SED = gsed +endif + +ifeq ($(shell uname -s), Linux) +CPPFLAGS += -DLINUX +endif + +ifeq ($(shell uname -s), FreeBSD) +CPPFLAGS += -DFREEBSD +endif + +# Pass "VERBOSE=1" at command line to display command being invoked by GNU Make +ifneq ($(VERBOSE), 1) +.SILENT: +endif + +LIBSRC_C = $(wildcard libcsapp/*.c) +LIBSRC_S = $(wildcard libcsapp/*.s) +LIBSRC_H = $(wildcard include/*.h) +LIBSRCS = $(LIBSRC_C) $(LIBSRC_S) $(LIBSRC_H) +LIBOBJS = $(LIBSRC_C:%.c=%.o) +ifneq ($(shell uname -s), Darwin) +LIBOBJS += $(LIBSRC_S:%.s=%.o) +endif +LIB = libcsapp/libcsapp.a + +SRC_C = $(wildcard *.c) +SRC_S = $(wildcard *.s) +SRC_H = $(wildcard *.h) +SRCS = $(SRC_C) $(SRC_S) +OBJS = $(SRC_C:%.c=%.o) + +SOURCES = $(SRCS) $(LIBSRCS) +OBJECTS = $(OBJS) $(LIBOBJS) +DEPFILES = $(foreach f,$(SRC_C) $(LIBSRC_C),\ + $(dir $(f))$(patsubst %.c,.%.d,$(notdir $(f)))) + +ARCHIVE = so$(shell date +'%y')_$(shell basename $(PWD)) +FILES = Makefile Makefile.include $(EXTRA-FILES) + +all: $(DEPFILES) $(LIB) $(PROGS) + +$(LIB): $(LIBOBJS) + +# Generate dependencies automatically +ifeq ($(words $(findstring $(MAKECMDGOALS), archive clean)), 0) + -include $(DEPFILES) +endif + +# Disable all built-in recipes and define our own +.SUFFIXES: + +.%.d: %.c + $(CC) $(CPPFLAGS) -MM -MG -o $@ $< + +%.o: %.c .%.d + @echo "[CC] $@ <- $<" + $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< + +%.o: %.s + @echo "[AS] $@ <- $<" + $(AS) $(ASFLAGS) -c -o $@ $< + +%.a: + @echo "[AR] $@ <- $^" + $(AR) rc $@ $^ + +%: %.o $(LIB) + @echo "[LD] $@ <- $^" + $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) + +clean: + rm -vf $(PROGS) $(OBJECTS) $(DEPFILES) $(LIB) + rm -vf $(shell find -L . -iname '*~') + rm -vf $(ARCHIVE).tar.gz + rm -vrf $(EXTRA-CLEAN) *.dSYM + +format: + clang-format --style=file -i $(LIBSRC_C) $(LIBSRC_H) $(SRC_C) $(SRC_H) + +archive: clean + mkdir -p $(ARCHIVE) $(ARCHIVE)/libcsapp $(ARCHIVE)/include + cp -L $(SRCS) $(SRC_H) $(FILES) $(ARCHIVE)/ + cp -L $(LIBSRCS) $(ARCHIVE)/libcsapp/ + cp -L $(LIBSRC_H) $(ARCHIVE)/include/ + for f in $(SRCS:%=$(ARCHIVE)/%); do \ + $(SED) --in-place='' -e '/^#if.*STUDENT/,/^#endif.*STUDENT/d' $$f; \ + done + tar cvzhf $(ARCHIVE).tar.gz $(ARCHIVE) + rm -rf $(ARCHIVE) + +.PHONY: all clean format archive + +# vim: ts=8 sw=8 noet diff --git a/semestr-5/so/lista5/so21_lista_5/gen-nums.py b/semestr-5/so/lista5/so21_lista_5/gen-nums.py new file mode 100755 index 0000000..06c7522 --- /dev/null +++ b/semestr-5/so/lista5/so21_lista_5/gen-nums.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 + +import random +import sys + + +if __name__ == '__main__': + nelem = int(sys.argv[1]) + print(nelem) + for i in range(nelem): + print(random.randint(-nelem * 10, nelem * 10)) diff --git a/semestr-5/so/lista5/so21_lista_5/include/bitstring.h b/semestr-5/so/lista5/so21_lista_5/include/bitstring.h new file mode 100644 index 0000000..66503f0 --- /dev/null +++ b/semestr-5/so/lista5/so21_lista_5/include/bitstring.h @@ -0,0 +1,138 @@ +/* $NetBSD: bitstring.h,v 1.14 2016/03/17 02:25:32 christos Exp $ */ + +/* + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Paul Vixie. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)bitstring.h 8.1 (Berkeley) 7/19/93 + */ + +#ifndef _BITSTRING_H_ +#define _BITSTRING_H_ + +/* modified for SV/AT and bitstring bugfix by M.R.Murphy, 11oct91 + * bitstr_size changed gratuitously, but shorter + * bit_alloc spelling error fixed + * the following were efficient, but didn't work, they've been made to + * work, but are no longer as efficient :-) + * bit_nclear, bit_nset, bit_ffc, bit_ffs + */ +/* + * The comment above may or may not bear any resemblance to reality. + * This code has been maintained in a confusing way, with little + * information available on the provenance of much of it. "At least it + * works." + * /s/ Perry E. Metzger, 2 Feb 98 + */ +typedef unsigned char bitstr_t; + +/* internal macros */ +/* byte of the bitstring bit is in */ +#define _bit_byte(bit) (uint32_t)((bit) >> 3) + +/* mask for the bit within its byte */ +#define _bit_mask(bit) (uint32_t)((1 << (uint32_t)((bit)&0x7))) + +/* external macros */ +/* bytes in a bitstring of nbits bits */ +#define bitstr_size(nbits) (size_t)((uint32_t)((nbits) + 7) >> 3) + +/* allocate a bitstring */ +#define bit_alloc(nbits) calloc(bitstr_size(nbits), sizeof(bitstr_t)) + +/* allocate a bitstring on the stack */ +#define bit_decl(name, nbits) ((name)[bitstr_size(nbits)]) + +/* is bit N of bitstring name set? */ +#define bit_test(name, bit) \ + /*LINTED bitwise on signed*/ ((name)[_bit_byte(bit)] & _bit_mask(bit)) + +/* set bit N of bitstring name */ +#define bit_set(name, bit) \ + /*LINTED bitwise on signed*/ \ + ((name)[_bit_byte(bit)] = \ + (unsigned char)(_bit_mask(bit) | (name)[_bit_byte(bit)])) + +/* clear bit N of bitstring name */ +#define bit_clear(name, bit) \ + /*LINTED bitwise on signed*/ \ + ((name)[_bit_byte(bit)] &= (unsigned char)~_bit_mask(bit)) + +/* clear bits start ... stop in bitstring */ +#define bit_nclear(name, start, stop) \ + do { \ + bitstr_t *_name = name; \ + size_t _start = start, _stop = stop; \ + while (_start <= _stop) { \ + bit_clear(_name, _start); \ + _start++; \ + } \ + } while (/*CONSTCOND*/ 0) + +/* set bits start ... stop in bitstring */ +#define bit_nset(name, start, stop) \ + do { \ + bitstr_t *_name = name; \ + size_t _start = start, _stop = stop; \ + while (_start <= _stop) { \ + bit_set(_name, _start); \ + _start++; \ + } \ + } while (/*CONSTCOND*/ 0) + +/* find first bit clear in name */ +#define bit_ffc(name, nbits, value) \ + do { \ + const bitstr_t *_name = name; \ + size_t _bit, _nbits = nbits; \ + int _value = -1; \ + for (_bit = 0; _bit < _nbits; ++_bit) \ + if (!bit_test(_name, _bit)) { \ + _value = _bit; \ + break; \ + } \ + *(value) = _value; \ + } while (/*CONSTCOND*/ 0) + +/* find first bit set in name */ +#define bit_ffs(name, nbits, value) \ + do { \ + const bitstr_t *_name = name; \ + size_t _bit, _nbits = nbits; \ + int _value = -1; \ + for (_bit = 0; _bit < _nbits; ++_bit) \ + if (bit_test(_name, _bit)) { \ + _value = _bit; \ + break; \ + } \ + *(value) = _value; \ + } while (/*CONSTCOND*/ 0) + +#endif /* !_BITSTRING_H_ */ diff --git a/semestr-5/so/lista5/so21_lista_5/include/csapp.h b/semestr-5/so/lista5/so21_lista_5/include/csapp.h new file mode 100644 index 0000000..dabdf77 --- /dev/null +++ b/semestr-5/so/lista5/so21_lista_5/include/csapp.h @@ -0,0 +1,240 @@ +#ifndef __CSAPP_H__ +#define __CSAPP_H__ + +#include +#include +#ifdef LINUX +#include +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define _CONCAT(x, y) x##y +#define CONCAT(x, y) _CONCAT(x, y) + +#define min(a, b) \ + ({ \ + typeof(a) _a = (a); \ + typeof(b) _b = (b); \ + _a < _b ? _a : _b; \ + }) + +#define max(a, b) \ + ({ \ + typeof(a) _a = (a); \ + typeof(b) _b = (b); \ + _a > _b ? _a : _b; \ + }) + +#ifndef powerof2 +#define powerof2(x) (((x) & ((x)-1)) == 0) +#endif + +#ifndef __unused +#define __unused __attribute__((unused)) +#endif + +extern char **environ; + +/* Useful constants. */ +#define MAXLINE 4096 + +/* Our own error-handling functions */ +noreturn void unix_error(const char *fmt, ...) + __attribute__((format(printf, 1, 2))); +noreturn void posix_error(int code, const char *fmt, ...) + __attribute__((format(printf, 2, 3))); +noreturn void app_error(const char *fmt, ...) + __attribute__((format(printf, 1, 2))); +noreturn void gai_error(int code, const char *fmt, ...) + __attribute__((format(printf, 2, 3))); + +/* Signal safe I/O functions */ +void safe_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2))); +void safe_error(const char *fmt, ...) __attribute__((format(printf, 1, 2))); + +/* Decent hashing function. */ +#define HASHINIT 5381 + +uint32_t jenkins_hash(const void *key, size_t length, uint32_t initval); + +/* Memory allocation wrappers */ +void *Malloc(size_t size); +void *Realloc(void *ptr, size_t size); +void *Calloc(size_t nmemb, size_t size); + +/* Process control wrappers */ +pid_t Fork(void); +pid_t Waitpid(pid_t pid, int *iptr, int options); +#define Wait(iptr) Waitpid(-1, iptr, 0) +void Prctl(int option, long arg); + +/* Process environment */ +char *Getcwd(char *buf, size_t buflen); + +/* Signal control wrappers */ +void (*Signal(int sig, void (*func)(int)))(int); +void Kill(pid_t pid, int sig); +void Sigprocmask(int how, const sigset_t *set, sigset_t *oldset); +void Sigaction(int signum, const struct sigaction *act, + struct sigaction *oldact); +void Sigsuspend(const sigset_t *mask); + +/* Process group control wrappers */ +void Setpgid(pid_t pid, pid_t pgid); + +/* Stdio wrappers */ +char *Fgets(char *ptr, int n, FILE *stream); +void Fputs(const char *ptr, FILE *stream); + +/* Unix I/O wrappers */ +int Open(const char *pathname, int flags, mode_t mode); +size_t Read(int fd, void *buf, size_t count); +size_t Write(int fd, const void *buf, size_t count); +size_t Writev(int fd, const struct iovec *iov, int iovcnt); +off_t Lseek(int fildes, off_t offset, int whence); +void Close(int fd); +void Ftruncate(int fd, off_t length); +int Dup(int fd); +int Dup2(int oldfd, int newfd); +void Pipe(int fds[2]); +void Socketpair(int domain, int type, int protocol, int sv[2]); +int Select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, + struct timeval *timeout); +int Poll(struct pollfd *fds, nfds_t nfds, int timeout); + +/* Directory access (Linux specific) */ +struct linux_dirent { + unsigned long d_ino; /* Inode number */ + unsigned long d_off; /* Offset to next linux_dirent */ + unsigned short d_reclen; /* Length of this linux_dirent */ + char d_name[]; /* Filename (null-terminated) */ +}; + +int Getdents(int fd, struct linux_dirent *dirp, unsigned count); + +/* Directory operations */ +void Rename(const char *oldpath, const char *newpath); +void Unlink(const char *pathname); + +/* File metadata access wrapper */ +void Fstat(int fd, struct stat *statbuf); +void Fstatat(int dirfd, const char *pathname, struct stat *statbuf, int flags); +size_t Readlink(const char *pathname, char *buf, size_t bufsiz); +size_t Readlinkat(int dirfd, const char *pathname, char *buf, size_t bufsiz); + +/* Memory mapped files & anonymous memory */ +void *Mmap(void *addr, size_t length, int prot, int flags, int fd, + off_t offset); +void Mprotect(void *addr, size_t len, int prot); +void Munmap(void *addr, size_t len); +void Madvise(void *addr, size_t length, int advice); + +/* Terminal control */ +void Tcsetpgrp(int fd, pid_t pgrp); +pid_t Tcgetpgrp(int fd); +void Tcsetattr(int fd, int action, const struct termios *termios_p); +void Tcgetattr(int fd, struct termios *termios_p); + +/* Setjmp & longjmp implementation without sigprocmask */ +typedef struct { + long rbx; + long rbp; + long r12; + long r13; + long r14; + long r15; + void *rsp; + void *rip; +} Jmpbuf[1]; + +int Setjmp(Jmpbuf env); +noreturn void Longjmp(Jmpbuf env, int val); + +/* Socket interface wrappers. */ +typedef struct sockaddr SA; +int Socket(int domain, int type, int protocol); +void Setsockopt(int s, int level, int optname, const void *optval, int optlen); +void Bind(int sockfd, struct sockaddr *my_addr, int addrlen); +void Listen(int s, int backlog); +int Accept(int s, struct sockaddr *addr, socklen_t *addrlen); +void Connect(int sockfd, struct sockaddr *serv_addr, int addrlen); + +/* Protocol-independent wrappers. */ +void Getaddrinfo(const char *node, const char *service, + const struct addrinfo *hints, struct addrinfo **res); +void Getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, + size_t hostlen, char *serv, size_t servlen, int flags); +int open_clientfd(char *hostname, char *port); +int Open_clientfd(char *hostname, char *port); +int open_listenfd(char *port, int backlog); +int Open_listenfd(char *port, int backlog); + +/* POSIX thread control wrappers. */ + +void Pthread_create(pthread_t *tidp, pthread_attr_t *attrp, + void *(*routine)(void *), void *argp); +void Pthread_cancel(pthread_t tid); +void Pthread_join(pthread_t tid, void **thread_return); +void Pthread_detach(pthread_t tid); + +/* POSIX semaphore wrappers. */ +void Sem_init(sem_t *sem, int pshared, unsigned value); +void Sem_destroy(sem_t *sem); +void Sem_wait(sem_t *sem); +void Sem_getvalue(sem_t *sem, int *sval); +void Sem_post(sem_t *sem); + +/* POSIX mutex wrappers. */ +void Pthread_mutex_init(pthread_mutex_t *mutex, + const pthread_mutexattr_t *mutexattr); +void Pthread_mutex_destroy(pthread_mutex_t *mutex); +void Pthread_mutex_lock(pthread_mutex_t *mutex); +void Pthread_mutex_unlock(pthread_mutex_t *mutex); + +/* POSIX conditional variable wrappers. */ +void Pthread_cond_init(pthread_cond_t *cond, pthread_condattr_t *cond_attr); +void Pthread_cond_destroy(pthread_cond_t *cond); +void Pthread_cond_signal(pthread_cond_t *cond); +void Pthread_cond_broadcast(pthread_cond_t *cond); +void Pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex); + +/* POSIX reader-writer lock wrappers. */ +void Pthread_rwlock_init(pthread_rwlock_t *rwlock, + const pthread_rwlockattr_t *rwlockattr); +void Pthread_rwlock_destroy(pthread_rwlock_t *rwlock); +void Pthread_rwlock_rdlock(pthread_rwlock_t *rwlock); +void Pthread_rwlock_wrlock(pthread_rwlock_t *rwlock); +void Pthread_rwlock_unlock(pthread_rwlock_t *rwlock); + +#endif /* __CSAPP_H__ */ diff --git a/semestr-5/so/lista5/so21_lista_5/include/queue.h b/semestr-5/so/lista5/so21_lista_5/include/queue.h new file mode 100644 index 0000000..de4ddc9 --- /dev/null +++ b/semestr-5/so/lista5/so21_lista_5/include/queue.h @@ -0,0 +1,587 @@ +/* $NetBSD: queue.h,v 1.74 2019/03/23 12:01:18 maxv Exp $ */ + +/* + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)queue.h 8.5 (Berkeley) 8/20/94 + */ + +#ifndef _QUEUE_H_ +#define _QUEUE_H_ + +/* + * This file defines five types of data structures: singly-linked lists, + * lists, simple queues, tail queues, and circular queues. + * + * A singly-linked list is headed by a single forward pointer. The + * elements are singly linked for minimum space and pointer manipulation + * overhead at the expense of O(n) removal for arbitrary elements. New + * elements can be added to the list after an existing element or at the + * head of the list. Elements being removed from the head of the list + * should use the explicit macro for this purpose for optimum + * efficiency. A singly-linked list may only be traversed in the forward + * direction. Singly-linked lists are ideal for applications with large + * datasets and few or no removals or for implementing a LIFO queue. + * + * A list is headed by a single forward pointer (or an array of forward + * pointers for a hash table header). The elements are doubly linked + * so that an arbitrary element can be removed without a need to + * traverse the list. New elements can be added to the list before + * or after an existing element or at the head of the list. A list + * may only be traversed in the forward direction. + * + * A simple queue is headed by a pair of pointers, one the head of the + * list and the other to the tail of the list. The elements are singly + * linked to save space, so elements can only be removed from the + * head of the list. New elements can be added to the list after + * an existing element, at the head of the list, or at the end of the + * list. A simple queue may only be traversed in the forward direction. + * + * A tail queue is headed by a pair of pointers, one to the head of the + * list and the other to the tail of the list. The elements are doubly + * linked so that an arbitrary element can be removed without a need to + * traverse the list. New elements can be added to the list before or + * after an existing element, at the head of the list, or at the end of + * the list. A tail queue may be traversed in either direction. + * + * A circle queue is headed by a pair of pointers, one to the head of the + * list and the other to the tail of the list. The elements are doubly + * linked so that an arbitrary element can be removed without a need to + * traverse the list. New elements can be added to the list before or after + * an existing element, at the head of the list, or at the end of the list. + * A circle queue may be traversed in either direction, but has a more + * complex end of list detection. + * + * For details on the use of these macros, see the queue(3) manual page. + */ + +/* + * Include the definition of NULL only on NetBSD because sys/null.h + * is not available elsewhere. This conditional makes the header + * portable and it can simply be dropped verbatim into any system. + * The caveat is that on other systems some other header + * must provide NULL before the macros can be used. + */ + +/* + * Singly-linked List definitions. + */ +#define SLIST_HEAD(name, type) \ + struct name { \ + struct type *slh_first; /* first element */ \ + } + +#define SLIST_HEAD_INITIALIZER(head) \ + { NULL } + +#define SLIST_ENTRY(type) \ + struct { \ + struct type *sle_next; /* next element */ \ + } + +/* + * Singly-linked List access methods. + */ +#define SLIST_FIRST(head) ((head)->slh_first) +#define SLIST_END(head) NULL +#define SLIST_EMPTY(head) ((head)->slh_first == NULL) +#define SLIST_NEXT(elm, field) ((elm)->field.sle_next) + +#define SLIST_FOREACH(var, head, field) \ + for ((var) = (head)->slh_first; (var) != SLIST_END(head); \ + (var) = (var)->field.sle_next) + +#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ + for ((var) = SLIST_FIRST((head)); \ + (var) != SLIST_END(head) && ((tvar) = SLIST_NEXT((var), field), 1); \ + (var) = (tvar)) + +/* + * Singly-linked List functions. + */ +#define SLIST_INIT(head) \ + do { \ + (head)->slh_first = SLIST_END(head); \ + } while (/*CONSTCOND*/ 0) + +#define SLIST_INSERT_AFTER(slistelm, elm, field) \ + do { \ + (elm)->field.sle_next = (slistelm)->field.sle_next; \ + (slistelm)->field.sle_next = (elm); \ + } while (/*CONSTCOND*/ 0) + +#define SLIST_INSERT_HEAD(head, elm, field) \ + do { \ + (elm)->field.sle_next = (head)->slh_first; \ + (head)->slh_first = (elm); \ + } while (/*CONSTCOND*/ 0) + +#define SLIST_REMOVE_AFTER(slistelm, field) \ + do { \ + (slistelm)->field.sle_next = \ + SLIST_NEXT(SLIST_NEXT((slistelm), field), field); \ + } while (/*CONSTCOND*/ 0) + +#define SLIST_REMOVE_HEAD(head, field) \ + do { \ + (head)->slh_first = (head)->slh_first->field.sle_next; \ + } while (/*CONSTCOND*/ 0) + +#define SLIST_REMOVE(head, elm, type, field) \ + do { \ + if ((head)->slh_first == (elm)) { \ + SLIST_REMOVE_HEAD((head), field); \ + } else { \ + struct type *curelm = (head)->slh_first; \ + while (curelm->field.sle_next != (elm)) \ + curelm = curelm->field.sle_next; \ + curelm->field.sle_next = curelm->field.sle_next->field.sle_next; \ + } \ + } while (/*CONSTCOND*/ 0) + +/* + * List definitions. + */ +#define LIST_HEAD(name, type) \ + struct name { \ + struct type *lh_first; /* first element */ \ + } + +#define LIST_HEAD_INITIALIZER(head) \ + { NULL } + +#define LIST_ENTRY(type) \ + struct { \ + struct type *le_next; /* next element */ \ + struct type **le_prev; /* address of previous next element */ \ + } + +/* + * List access methods. + */ +#define LIST_FIRST(head) ((head)->lh_first) +#define LIST_END(head) NULL +#define LIST_EMPTY(head) ((head)->lh_first == LIST_END(head)) +#define LIST_NEXT(elm, field) ((elm)->field.le_next) + +#define LIST_FOREACH(var, head, field) \ + for ((var) = ((head)->lh_first); (var) != LIST_END(head); \ + (var) = ((var)->field.le_next)) + +#define LIST_FOREACH_SAFE(var, head, field, tvar) \ + for ((var) = LIST_FIRST((head)); \ + (var) != LIST_END(head) && ((tvar) = LIST_NEXT((var), field), 1); \ + (var) = (tvar)) + +#define LIST_MOVE(head1, head2, field) \ + do { \ + LIST_INIT((head2)); \ + if (!LIST_EMPTY((head1))) { \ + (head2)->lh_first = (head1)->lh_first; \ + (head2)->lh_first->field.le_prev = &(head2)->lh_first; \ + LIST_INIT((head1)); \ + } \ + } while (/*CONSTCOND*/ 0) + +/* + * List functions. + */ +#define LIST_INIT(head) \ + do { \ + (head)->lh_first = LIST_END(head); \ + } while (/*CONSTCOND*/ 0) + +#define LIST_INSERT_AFTER(listelm, elm, field) \ + do { \ + if (((elm)->field.le_next = (listelm)->field.le_next) != LIST_END(head)) \ + (listelm)->field.le_next->field.le_prev = &(elm)->field.le_next; \ + (listelm)->field.le_next = (elm); \ + (elm)->field.le_prev = &(listelm)->field.le_next; \ + } while (/*CONSTCOND*/ 0) + +#define LIST_INSERT_BEFORE(listelm, elm, field) \ + do { \ + (elm)->field.le_prev = (listelm)->field.le_prev; \ + (elm)->field.le_next = (listelm); \ + *(listelm)->field.le_prev = (elm); \ + (listelm)->field.le_prev = &(elm)->field.le_next; \ + } while (/*CONSTCOND*/ 0) + +#define LIST_INSERT_HEAD(head, elm, field) \ + do { \ + if (((elm)->field.le_next = (head)->lh_first) != LIST_END(head)) \ + (head)->lh_first->field.le_prev = &(elm)->field.le_next; \ + (head)->lh_first = (elm); \ + (elm)->field.le_prev = &(head)->lh_first; \ + } while (/*CONSTCOND*/ 0) + +#define LIST_REMOVE(elm, field) \ + do { \ + if ((elm)->field.le_next != NULL) \ + (elm)->field.le_next->field.le_prev = (elm)->field.le_prev; \ + *(elm)->field.le_prev = (elm)->field.le_next; \ + } while (/*CONSTCOND*/ 0) + +#define LIST_REPLACE(elm, elm2, field) \ + do { \ + if (((elm2)->field.le_next = (elm)->field.le_next) != NULL) \ + (elm2)->field.le_next->field.le_prev = &(elm2)->field.le_next; \ + (elm2)->field.le_prev = (elm)->field.le_prev; \ + *(elm2)->field.le_prev = (elm2); \ + } while (/*CONSTCOND*/ 0) + +/* + * Simple queue definitions. + */ +#define SIMPLEQ_HEAD(name, type) \ + struct name { \ + struct type *sqh_first; /* first element */ \ + struct type **sqh_last; /* addr of last next element */ \ + } + +#define SIMPLEQ_HEAD_INITIALIZER(head) \ + { NULL, &(head).sqh_first } + +#define SIMPLEQ_ENTRY(type) \ + struct { \ + struct type *sqe_next; /* next element */ \ + } + +/* + * Simple queue access methods. + */ +#define SIMPLEQ_FIRST(head) ((head)->sqh_first) +#define SIMPLEQ_END(head) NULL +#define SIMPLEQ_EMPTY(head) ((head)->sqh_first == SIMPLEQ_END(head)) +#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next) + +#define SIMPLEQ_FOREACH(var, head, field) \ + for ((var) = ((head)->sqh_first); (var) != SIMPLEQ_END(head); \ + (var) = ((var)->field.sqe_next)) + +#define SIMPLEQ_FOREACH_SAFE(var, head, field, next) \ + for ((var) = ((head)->sqh_first); \ + (var) != SIMPLEQ_END(head) && ((next = ((var)->field.sqe_next)), 1); \ + (var) = (next)) + +/* + * Simple queue functions. + */ +#define SIMPLEQ_INIT(head) \ + do { \ + (head)->sqh_first = NULL; \ + (head)->sqh_last = &(head)->sqh_first; \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_INSERT_HEAD(head, elm, field) \ + do { \ + if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \ + (head)->sqh_last = &(elm)->field.sqe_next; \ + (head)->sqh_first = (elm); \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_INSERT_TAIL(head, elm, field) \ + do { \ + (elm)->field.sqe_next = NULL; \ + *(head)->sqh_last = (elm); \ + (head)->sqh_last = &(elm)->field.sqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) \ + do { \ + if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL) \ + (head)->sqh_last = &(elm)->field.sqe_next; \ + (listelm)->field.sqe_next = (elm); \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_REMOVE_HEAD(head, field) \ + do { \ + if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \ + (head)->sqh_last = &(head)->sqh_first; \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_REMOVE_AFTER(head, elm, field) \ + do { \ + if (((elm)->field.sqe_next = (elm)->field.sqe_next->field.sqe_next) == \ + NULL) \ + (head)->sqh_last = &(elm)->field.sqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_REMOVE(head, elm, type, field) \ + do { \ + if ((head)->sqh_first == (elm)) { \ + SIMPLEQ_REMOVE_HEAD((head), field); \ + } else { \ + struct type *curelm = (head)->sqh_first; \ + while (curelm->field.sqe_next != (elm)) \ + curelm = curelm->field.sqe_next; \ + if ((curelm->field.sqe_next = curelm->field.sqe_next->field.sqe_next) == \ + NULL) \ + (head)->sqh_last = &(curelm)->field.sqe_next; \ + } \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_CONCAT(head1, head2) \ + do { \ + if (!SIMPLEQ_EMPTY((head2))) { \ + *(head1)->sqh_last = (head2)->sqh_first; \ + (head1)->sqh_last = (head2)->sqh_last; \ + SIMPLEQ_INIT((head2)); \ + } \ + } while (/*CONSTCOND*/ 0) + +#define SIMPLEQ_LAST(head, type, field) \ + (SIMPLEQ_EMPTY((head)) \ + ? NULL \ + : ((struct type *)(void *)((char *)((head)->sqh_last) - \ + offsetof(struct type, field)))) + +/* + * Tail queue definitions. + */ +#define _TAILQ_HEAD(name, type, qual) \ + struct name { \ + qual type *tqh_first; /* first element */ \ + qual type *qual *tqh_last; /* addr of last next element */ \ + } +#define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type, ) + +#define TAILQ_HEAD_INITIALIZER(head) \ + { TAILQ_END(head), &(head).tqh_first } + +#define _TAILQ_ENTRY(type, qual) \ + struct { \ + qual type *tqe_next; /* next element */ \ + qual type *qual *tqe_prev; /* address of previous next element */ \ + } +#define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type, ) + +/* + * Tail queue access methods. + */ +#define TAILQ_FIRST(head) ((head)->tqh_first) +#define TAILQ_END(head) (NULL) +#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) +#define TAILQ_LAST(head, headname) \ + (*(((struct headname *)(void *)((head)->tqh_last))->tqh_last)) +#define TAILQ_PREV(elm, headname, field) \ + (*(((struct headname *)(void *)((elm)->field.tqe_prev))->tqh_last)) +#define TAILQ_EMPTY(head) (TAILQ_FIRST(head) == TAILQ_END(head)) + +#define TAILQ_FOREACH(var, head, field) \ + for ((var) = ((head)->tqh_first); (var) != TAILQ_END(head); \ + (var) = ((var)->field.tqe_next)) + +#define TAILQ_FOREACH_SAFE(var, head, field, next) \ + for ((var) = ((head)->tqh_first); \ + (var) != TAILQ_END(head) && ((next) = TAILQ_NEXT(var, field), 1); \ + (var) = (next)) + +#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ + for ((var) = TAILQ_LAST((head), headname); (var) != TAILQ_END(head); \ + (var) = TAILQ_PREV((var), headname, field)) + +#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, prev) \ + for ((var) = TAILQ_LAST((head), headname); \ + (var) != TAILQ_END(head) && \ + ((prev) = TAILQ_PREV((var), headname, field), 1); \ + (var) = (prev)) + +/* + * Tail queue functions. + */ +#define TAILQ_INIT(head) \ + do { \ + (head)->tqh_first = TAILQ_END(head); \ + (head)->tqh_last = &(head)->tqh_first; \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_INSERT_HEAD(head, elm, field) \ + do { \ + if (((elm)->field.tqe_next = (head)->tqh_first) != TAILQ_END(head)) \ + (head)->tqh_first->field.tqe_prev = &(elm)->field.tqe_next; \ + else \ + (head)->tqh_last = &(elm)->field.tqe_next; \ + (head)->tqh_first = (elm); \ + (elm)->field.tqe_prev = &(head)->tqh_first; \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_INSERT_TAIL(head, elm, field) \ + do { \ + (elm)->field.tqe_next = TAILQ_END(head); \ + (elm)->field.tqe_prev = (head)->tqh_last; \ + *(head)->tqh_last = (elm); \ + (head)->tqh_last = &(elm)->field.tqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_INSERT_AFTER(head, listelm, elm, field) \ + do { \ + if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != \ + TAILQ_END(head)) \ + (elm)->field.tqe_next->field.tqe_prev = &(elm)->field.tqe_next; \ + else \ + (head)->tqh_last = &(elm)->field.tqe_next; \ + (listelm)->field.tqe_next = (elm); \ + (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_INSERT_BEFORE(listelm, elm, field) \ + do { \ + (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ + (elm)->field.tqe_next = (listelm); \ + *(listelm)->field.tqe_prev = (elm); \ + (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_REMOVE(head, elm, field) \ + do { \ + if (((elm)->field.tqe_next) != TAILQ_END(head)) \ + (elm)->field.tqe_next->field.tqe_prev = (elm)->field.tqe_prev; \ + else \ + (head)->tqh_last = (elm)->field.tqe_prev; \ + *(elm)->field.tqe_prev = (elm)->field.tqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_REPLACE(head, elm, elm2, field) \ + do { \ + if (((elm2)->field.tqe_next = (elm)->field.tqe_next) != TAILQ_END(head)) \ + (elm2)->field.tqe_next->field.tqe_prev = &(elm2)->field.tqe_next; \ + else \ + (head)->tqh_last = &(elm2)->field.tqe_next; \ + (elm2)->field.tqe_prev = (elm)->field.tqe_prev; \ + *(elm2)->field.tqe_prev = (elm2); \ + } while (/*CONSTCOND*/ 0) + +#define TAILQ_CONCAT(head1, head2, field) \ + do { \ + if (!TAILQ_EMPTY(head2)) { \ + *(head1)->tqh_last = (head2)->tqh_first; \ + (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \ + (head1)->tqh_last = (head2)->tqh_last; \ + TAILQ_INIT((head2)); \ + } \ + } while (/*CONSTCOND*/ 0) + +/* + * Singly-linked Tail queue declarations. + */ +#define STAILQ_HEAD(name, type) \ + struct name { \ + struct type *stqh_first; /* first element */ \ + struct type **stqh_last; /* addr of last next element */ \ + } + +#define STAILQ_HEAD_INITIALIZER(head) \ + { NULL, &(head).stqh_first } + +#define STAILQ_ENTRY(type) \ + struct { \ + struct type *stqe_next; /* next element */ \ + } + +/* + * Singly-linked Tail queue access methods. + */ +#define STAILQ_FIRST(head) ((head)->stqh_first) +#define STAILQ_END(head) NULL +#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) +#define STAILQ_EMPTY(head) (STAILQ_FIRST(head) == STAILQ_END(head)) + +/* + * Singly-linked Tail queue functions. + */ +#define STAILQ_INIT(head) \ + do { \ + (head)->stqh_first = NULL; \ + (head)->stqh_last = &(head)->stqh_first; \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_INSERT_HEAD(head, elm, field) \ + do { \ + if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \ + (head)->stqh_last = &(elm)->field.stqe_next; \ + (head)->stqh_first = (elm); \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_INSERT_TAIL(head, elm, field) \ + do { \ + (elm)->field.stqe_next = NULL; \ + *(head)->stqh_last = (elm); \ + (head)->stqh_last = &(elm)->field.stqe_next; \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_INSERT_AFTER(head, listelm, elm, field) \ + do { \ + if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL) \ + (head)->stqh_last = &(elm)->field.stqe_next; \ + (listelm)->field.stqe_next = (elm); \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_REMOVE_HEAD(head, field) \ + do { \ + if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \ + (head)->stqh_last = &(head)->stqh_first; \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_REMOVE(head, elm, type, field) \ + do { \ + if ((head)->stqh_first == (elm)) { \ + STAILQ_REMOVE_HEAD((head), field); \ + } else { \ + struct type *curelm = (head)->stqh_first; \ + while (curelm->field.stqe_next != (elm)) \ + curelm = curelm->field.stqe_next; \ + if ((curelm->field.stqe_next = \ + curelm->field.stqe_next->field.stqe_next) == NULL) \ + (head)->stqh_last = &(curelm)->field.stqe_next; \ + } \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_FOREACH(var, head, field) \ + for ((var) = ((head)->stqh_first); (var); (var) = ((var)->field.stqe_next)) + +#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ + for ((var) = STAILQ_FIRST((head)); \ + (var) && ((tvar) = STAILQ_NEXT((var), field), 1); (var) = (tvar)) + +#define STAILQ_CONCAT(head1, head2) \ + do { \ + if (!STAILQ_EMPTY((head2))) { \ + *(head1)->stqh_last = (head2)->stqh_first; \ + (head1)->stqh_last = (head2)->stqh_last; \ + STAILQ_INIT((head2)); \ + } \ + } while (/*CONSTCOND*/ 0) + +#define STAILQ_LAST(head, type, field) \ + (STAILQ_EMPTY((head)) \ + ? NULL \ + : ((struct type *)(void *)((char *)((head)->stqh_last) - \ + offsetof(struct type, field)))) + +#endif /* !_QUEUE_H_ */ diff --git a/semestr-5/so/lista5/so21_lista_5/include/rio.h b/semestr-5/so/lista5/so21_lista_5/include/rio.h new file mode 100644 index 0000000..bd62723 --- /dev/null +++ b/semestr-5/so/lista5/so21_lista_5/include/rio.h @@ -0,0 +1,27 @@ +#ifndef _RIO_H_ +#define _RIO_H_ + +/* Persistent state for the robust I/O (Rio) package */ +#define RIO_BUFSIZE 8192 + +typedef struct { + int rio_fd; /* Descriptor for this internal buf */ + int rio_cnt; /* Unread bytes in internal buf */ + char *rio_bufptr; /* Next unread byte in internal buf */ + char rio_buf[RIO_BUFSIZE]; /* Internal buffer */ +} rio_t; + +/* Rio (Robust I/O) package */ +ssize_t rio_readn(int fd, void *usrbuf, size_t n); +ssize_t rio_writen(int fd, const void *usrbuf, size_t n); +void rio_readinitb(rio_t *rp, int fd); +ssize_t rio_readnb(rio_t *rp, void *usrbuf, size_t n); +ssize_t rio_readlineb(rio_t *rp, void *usrbuf, size_t maxlen); + +/* Wrappers that exit on failure */ +ssize_t Rio_readn(int fd, void *ptr, size_t nbytes); +void Rio_writen(int fd, const void *usrbuf, size_t n); +ssize_t Rio_readnb(rio_t *rp, void *usrbuf, size_t n); +ssize_t Rio_readlineb(rio_t *rp, void *usrbuf, size_t maxlen); + +#endif /* !_RIO_H_ */ diff --git a/semestr-5/so/lista5/so21_lista_5/include/terminal.h b/semestr-5/so/lista5/so21_lista_5/include/terminal.h new file mode 100644 index 0000000..f221df2 --- /dev/null +++ b/semestr-5/so/lista5/so21_lista_5/include/terminal.h @@ -0,0 +1,27 @@ +#ifndef _TERMINAL_H_ +#define _TERMINAL_H_ + +int tty_open(void); +void tty_curpos(int fd, int *x, int *y); + +/* https://en.wikipedia.org/wiki/ANSI_escape_code#CSI_(Control_Sequence_Introducer)_sequences */ + +#define ESC "\033" +#define CSI ESC "[" + +#define CUU(n) CSI #n "A" /* Cursor Up */ +#define CUD(n) CSI #n "B" /* Cursor Down */ +#define CUF(n) CSI #n "C" /* Cursor Forward */ +#define CUB(n) CSI #n "D" /* Cursor Back */ +#define CNL(n) CSI #n "E" /* Cursor Next Line */ +#define CPL(n) CSI #n "F" /* Cursor Previous Line */ +#define CHA(n) CSI #n "G" /* Cursor Horizontal Absolute */ +#define CUP(n, m) CSI #n ";" #m "H" /* Cursor Position */ +#define ED(n) CSI #n "J" /* Erase in Display */ +#define EL(n) CSI #n "K" /* Erase in Line */ +#define SU(n) CSI #n "S" /* Scroll Up Scroll */ +#define SD(n) CSI #n "T" /* Scroll Down Scroll */ +#define CPR() CSI "6n" /* Cursor Position Report */ +#define SGR(x) CSI x "m" + +#endif /* !_ANSICODES_H_ */ diff --git a/semestr-5/so/lista5/so21_lista_5/include/tree.h b/semestr-5/so/lista5/so21_lista_5/include/tree.h new file mode 100644 index 0000000..3355bad --- /dev/null +++ b/semestr-5/so/lista5/so21_lista_5/include/tree.h @@ -0,0 +1,735 @@ +/* $NetBSD: tree.h,v 1.20 2013/09/14 13:20:45 joerg Exp $ */ +/* $OpenBSD: tree.h,v 1.13 2011/07/09 00:19:45 pirofti Exp $ */ +/* + * Copyright 2002 Niels Provos + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _TREE_H_ +#define _TREE_H_ + +/* + * This file defines data structures for different types of trees: + * splay trees and red-black trees. + * + * A splay tree is a self-organizing data structure. Every operation + * on the tree causes a splay to happen. The splay moves the requested + * node to the root of the tree and partly rebalances it. + * + * This has the benefit that request locality causes faster lookups as + * the requested nodes move to the top of the tree. On the other hand, + * every lookup causes memory writes. + * + * The Balance Theorem bounds the total access time for m operations + * and n inserts on an initially empty tree as O((m + n)lg n). The + * amortized cost for a sequence of m accesses to a splay tree is O(lg n); + * + * A red-black tree is a binary search tree with the node color as an + * extra attribute. It fulfills a set of conditions: + * - every search path from the root to a leaf consists of the + * same number of black nodes, + * - each red node (except for the root) has a black parent, + * - each leaf node is black. + * + * Every operation on a red-black tree is bounded as O(lg n). + * The maximum height of a red-black tree is 2lg (n+1). + */ + +#define SPLAY_HEAD(name, type) \ + struct name { \ + struct type *sph_root; /* root of the tree */ \ + } + +#define SPLAY_INITIALIZER(root) \ + { NULL } + +#define SPLAY_INIT(root) \ + do { \ + (root)->sph_root = NULL; \ + } while (/*CONSTCOND*/ 0) + +#define SPLAY_ENTRY(type) \ + struct { \ + struct type *spe_left; /* left element */ \ + struct type *spe_right; /* right element */ \ + } + +#define SPLAY_LEFT(elm, field) (elm)->field.spe_left +#define SPLAY_RIGHT(elm, field) (elm)->field.spe_right +#define SPLAY_ROOT(head) (head)->sph_root +#define SPLAY_EMPTY(head) (SPLAY_ROOT(head) == NULL) + +/* SPLAY_ROTATE_{LEFT,RIGHT} expect that tmp hold SPLAY_{RIGHT,LEFT} */ +#define SPLAY_ROTATE_RIGHT(head, tmp, field) \ + do { \ + SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field); \ + SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ + (head)->sph_root = tmp; \ + } while (/*CONSTCOND*/ 0) + +#define SPLAY_ROTATE_LEFT(head, tmp, field) \ + do { \ + SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \ + SPLAY_LEFT(tmp, field) = (head)->sph_root; \ + (head)->sph_root = tmp; \ + } while (/*CONSTCOND*/ 0) + +#define SPLAY_LINKLEFT(head, tmp, field) \ + do { \ + SPLAY_LEFT(tmp, field) = (head)->sph_root; \ + tmp = (head)->sph_root; \ + (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \ + } while (/*CONSTCOND*/ 0) + +#define SPLAY_LINKRIGHT(head, tmp, field) \ + do { \ + SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ + tmp = (head)->sph_root; \ + (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \ + } while (/*CONSTCOND*/ 0) + +#define SPLAY_ASSEMBLE(head, node, left, right, field) \ + do { \ + SPLAY_RIGHT(left, field) = SPLAY_LEFT((head)->sph_root, field); \ + SPLAY_LEFT(right, field) = SPLAY_RIGHT((head)->sph_root, field); \ + SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(node, field); \ + SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(node, field); \ + } while (/*CONSTCOND*/ 0) + +/* Generates prototypes and inline functions */ + +#define SPLAY_PROTOTYPE(name, type, field, cmp) \ + void name##_SPLAY(struct name *, struct type *); \ + void name##_SPLAY_MINMAX(struct name *, int); \ + struct type *name##_SPLAY_INSERT(struct name *, struct type *); \ + struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \ + \ + /* Finds the node with the same key as elm */ \ + static __inline struct type *name##_SPLAY_FIND(struct name *head, \ + struct type *elm) { \ + if (SPLAY_EMPTY(head)) \ + return (NULL); \ + name##_SPLAY(head, elm); \ + if ((cmp)(elm, (head)->sph_root) == 0) \ + return (head->sph_root); \ + return (NULL); \ + } \ + \ + static __inline __unused struct type *name##_SPLAY_NEXT(struct name *head, \ + struct type *elm) { \ + name##_SPLAY(head, elm); \ + if (SPLAY_RIGHT(elm, field) != NULL) { \ + elm = SPLAY_RIGHT(elm, field); \ + while (SPLAY_LEFT(elm, field) != NULL) { \ + elm = SPLAY_LEFT(elm, field); \ + } \ + } else \ + elm = NULL; \ + return (elm); \ + } \ + \ + static __unused __inline struct type *name##_SPLAY_MIN_MAX( \ + struct name *head, int val) { \ + name##_SPLAY_MINMAX(head, val); \ + return (SPLAY_ROOT(head)); \ + } + +/* Main splay operation. + * Moves node close to the key of elm to top + */ +#define SPLAY_GENERATE(name, type, field, cmp) \ + struct type *name##_SPLAY_INSERT(struct name *head, struct type *elm) { \ + if (SPLAY_EMPTY(head)) { \ + SPLAY_LEFT(elm, field) = SPLAY_RIGHT(elm, field) = NULL; \ + } else { \ + int __comp; \ + name##_SPLAY(head, elm); \ + __comp = (cmp)(elm, (head)->sph_root); \ + if (__comp < 0) { \ + SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field); \ + SPLAY_RIGHT(elm, field) = (head)->sph_root; \ + SPLAY_LEFT((head)->sph_root, field) = NULL; \ + } else if (__comp > 0) { \ + SPLAY_RIGHT(elm, field) = SPLAY_RIGHT((head)->sph_root, field); \ + SPLAY_LEFT(elm, field) = (head)->sph_root; \ + SPLAY_RIGHT((head)->sph_root, field) = NULL; \ + } else \ + return ((head)->sph_root); \ + } \ + (head)->sph_root = (elm); \ + return (NULL); \ + } \ + \ + struct type *name##_SPLAY_REMOVE(struct name *head, struct type *elm) { \ + struct type *__tmp; \ + if (SPLAY_EMPTY(head)) \ + return (NULL); \ + name##_SPLAY(head, elm); \ + if ((cmp)(elm, (head)->sph_root) == 0) { \ + if (SPLAY_LEFT((head)->sph_root, field) == NULL) { \ + (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \ + } else { \ + __tmp = SPLAY_RIGHT((head)->sph_root, field); \ + (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \ + name##_SPLAY(head, elm); \ + SPLAY_RIGHT((head)->sph_root, field) = __tmp; \ + } \ + return (elm); \ + } \ + return (NULL); \ + } \ + \ + void name##_SPLAY(struct name *head, struct type *elm) { \ + struct type __node, *__left, *__right, *__tmp; \ + int __comp; \ + \ + SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL; \ + __left = __right = &__node; \ + \ + while ((__comp = (cmp)(elm, (head)->sph_root)) != 0) { \ + if (__comp < 0) { \ + __tmp = SPLAY_LEFT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if ((cmp)(elm, __tmp) < 0) { \ + SPLAY_ROTATE_RIGHT(head, __tmp, field); \ + if (SPLAY_LEFT((head)->sph_root, field) == NULL) \ + break; \ + } \ + SPLAY_LINKLEFT(head, __right, field); \ + } else if (__comp > 0) { \ + __tmp = SPLAY_RIGHT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if ((cmp)(elm, __tmp) > 0) { \ + SPLAY_ROTATE_LEFT(head, __tmp, field); \ + if (SPLAY_RIGHT((head)->sph_root, field) == NULL) \ + break; \ + } \ + SPLAY_LINKRIGHT(head, __left, field); \ + } \ + } \ + SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ + } \ + \ + /* Splay with either the minimum or the maximum element \ + * Used to find minimum or maximum element in tree. \ + */ \ + void name##_SPLAY_MINMAX(struct name *head, int __comp) { \ + struct type __node, *__left, *__right, *__tmp; \ + \ + SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL; \ + __left = __right = &__node; \ + \ + while (1) { \ + if (__comp < 0) { \ + __tmp = SPLAY_LEFT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if (__comp < 0) { \ + SPLAY_ROTATE_RIGHT(head, __tmp, field); \ + if (SPLAY_LEFT((head)->sph_root, field) == NULL) \ + break; \ + } \ + SPLAY_LINKLEFT(head, __right, field); \ + } else if (__comp > 0) { \ + __tmp = SPLAY_RIGHT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if (__comp > 0) { \ + SPLAY_ROTATE_LEFT(head, __tmp, field); \ + if (SPLAY_RIGHT((head)->sph_root, field) == NULL) \ + break; \ + } \ + SPLAY_LINKRIGHT(head, __left, field); \ + } \ + } \ + SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ + } + +#define SPLAY_NEGINF -1 +#define SPLAY_INF 1 + +#define SPLAY_INSERT(name, x, y) name##_SPLAY_INSERT(x, y) +#define SPLAY_REMOVE(name, x, y) name##_SPLAY_REMOVE(x, y) +#define SPLAY_FIND(name, x, y) name##_SPLAY_FIND(x, y) +#define SPLAY_NEXT(name, x, y) name##_SPLAY_NEXT(x, y) +#define SPLAY_MIN(name, x) \ + (SPLAY_EMPTY(x) ? NULL : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF)) +#define SPLAY_MAX(name, x) \ + (SPLAY_EMPTY(x) ? NULL : name##_SPLAY_MIN_MAX(x, SPLAY_INF)) + +#define SPLAY_FOREACH(x, name, head) \ + for ((x) = SPLAY_MIN(name, head); (x) != NULL; \ + (x) = SPLAY_NEXT(name, head, x)) + +/* Macros that define a red-black tree */ +#define RB_HEAD(name, type) \ + struct name { \ + struct type *rbh_root; /* root of the tree */ \ + } + +#define RB_INITIALIZER(root) \ + { NULL } + +#define RB_INIT(root) \ + do { \ + (root)->rbh_root = NULL; \ + } while (/*CONSTCOND*/ 0) + +#define RB_BLACK 0 +#define RB_RED 1 +#define RB_ENTRY(type) \ + struct { \ + struct type *rbe_left; /* left element */ \ + struct type *rbe_right; /* right element */ \ + struct type *rbe_parent; /* parent element */ \ + int rbe_color; /* node color */ \ + } + +#define RB_LEFT(elm, field) (elm)->field.rbe_left +#define RB_RIGHT(elm, field) (elm)->field.rbe_right +#define RB_PARENT(elm, field) (elm)->field.rbe_parent +#define RB_COLOR(elm, field) (elm)->field.rbe_color +#define RB_ROOT(head) (head)->rbh_root +#define RB_EMPTY(head) (RB_ROOT(head) == NULL) + +#define RB_SET(elm, parent, field) \ + do { \ + RB_PARENT(elm, field) = parent; \ + RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL; \ + RB_COLOR(elm, field) = RB_RED; \ + } while (/*CONSTCOND*/ 0) + +#define RB_SET_BLACKRED(black, red, field) \ + do { \ + RB_COLOR(black, field) = RB_BLACK; \ + RB_COLOR(red, field) = RB_RED; \ + } while (/*CONSTCOND*/ 0) + +#ifndef RB_AUGMENT +#define RB_AUGMENT(x) \ + do { \ + } while (/*CONSTCOND*/ 0) +#endif + +#define RB_ROTATE_LEFT(head, elm, tmp, field) \ + do { \ + (tmp) = RB_RIGHT(elm, field); \ + if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field)) != NULL) { \ + RB_PARENT(RB_LEFT(tmp, field), field) = (elm); \ + } \ + RB_AUGMENT(elm); \ + if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \ + if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ + RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ + else \ + RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ + } else \ + (head)->rbh_root = (tmp); \ + RB_LEFT(tmp, field) = (elm); \ + RB_PARENT(elm, field) = (tmp); \ + RB_AUGMENT(tmp); \ + if ((RB_PARENT(tmp, field))) \ + RB_AUGMENT(RB_PARENT(tmp, field)); \ + } while (/*CONSTCOND*/ 0) + +#define RB_ROTATE_RIGHT(head, elm, tmp, field) \ + do { \ + (tmp) = RB_LEFT(elm, field); \ + if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field)) != NULL) { \ + RB_PARENT(RB_RIGHT(tmp, field), field) = (elm); \ + } \ + RB_AUGMENT(elm); \ + if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \ + if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ + RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ + else \ + RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ + } else \ + (head)->rbh_root = (tmp); \ + RB_RIGHT(tmp, field) = (elm); \ + RB_PARENT(elm, field) = (tmp); \ + RB_AUGMENT(tmp); \ + if ((RB_PARENT(tmp, field))) \ + RB_AUGMENT(RB_PARENT(tmp, field)); \ + } while (/*CONSTCOND*/ 0) + +/* Generates prototypes and inline functions */ +#define RB_PROTOTYPE(name, type, field, cmp) \ + RB_PROTOTYPE_INTERNAL(name, type, field, cmp, ) +#define RB_PROTOTYPE_STATIC(name, type, field, cmp) \ + RB_PROTOTYPE_INTERNAL(name, type, field, cmp, __unused static) +#define RB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr) \ + attr void name##_RB_INSERT_COLOR(struct name *, struct type *); \ + attr void name##_RB_REMOVE_COLOR(struct name *, struct type *, \ + struct type *); \ + attr struct type *name##_RB_REMOVE(struct name *, struct type *); \ + attr struct type *name##_RB_INSERT(struct name *, struct type *); \ + attr struct type *name##_RB_FIND(struct name *, struct type *); \ + attr struct type *name##_RB_NFIND(struct name *, struct type *); \ + attr struct type *name##_RB_NEXT(struct type *); \ + attr struct type *name##_RB_PREV(struct type *); \ + attr struct type *name##_RB_MINMAX(struct name *, int); + +/* Main rb operation. + * Moves node close to the key of elm to top + */ +#define RB_GENERATE(name, type, field, cmp) \ + RB_GENERATE_INTERNAL(name, type, field, cmp, ) +#define RB_GENERATE_STATIC(name, type, field, cmp) \ + RB_GENERATE_INTERNAL(name, type, field, cmp, __unused static) +#define RB_GENERATE_INTERNAL(name, type, field, cmp, attr) \ + attr void name##_RB_INSERT_COLOR(struct name *head, struct type *elm) { \ + struct type *parent, *gparent, *tmp; \ + while ((parent = RB_PARENT(elm, field)) != NULL && \ + RB_COLOR(parent, field) == RB_RED) { \ + gparent = RB_PARENT(parent, field); \ + if (parent == RB_LEFT(gparent, field)) { \ + tmp = RB_RIGHT(gparent, field); \ + if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ + RB_COLOR(tmp, field) = RB_BLACK; \ + RB_SET_BLACKRED(parent, gparent, field); \ + elm = gparent; \ + continue; \ + } \ + if (RB_RIGHT(parent, field) == elm) { \ + RB_ROTATE_LEFT(head, parent, tmp, field); \ + tmp = parent; \ + parent = elm; \ + elm = tmp; \ + } \ + RB_SET_BLACKRED(parent, gparent, field); \ + RB_ROTATE_RIGHT(head, gparent, tmp, field); \ + } else { \ + tmp = RB_LEFT(gparent, field); \ + if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ + RB_COLOR(tmp, field) = RB_BLACK; \ + RB_SET_BLACKRED(parent, gparent, field); \ + elm = gparent; \ + continue; \ + } \ + if (RB_LEFT(parent, field) == elm) { \ + RB_ROTATE_RIGHT(head, parent, tmp, field); \ + tmp = parent; \ + parent = elm; \ + elm = tmp; \ + } \ + RB_SET_BLACKRED(parent, gparent, field); \ + RB_ROTATE_LEFT(head, gparent, tmp, field); \ + } \ + } \ + RB_COLOR(head->rbh_root, field) = RB_BLACK; \ + } \ + \ + attr void name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, \ + struct type *elm) { \ + struct type *tmp; \ + while ((elm == NULL || RB_COLOR(elm, field) == RB_BLACK) && \ + elm != RB_ROOT(head)) { \ + if (RB_LEFT(parent, field) == elm) { \ + tmp = RB_RIGHT(parent, field); \ + if (RB_COLOR(tmp, field) == RB_RED) { \ + RB_SET_BLACKRED(tmp, parent, field); \ + RB_ROTATE_LEFT(head, parent, tmp, field); \ + tmp = RB_RIGHT(parent, field); \ + } \ + if ((RB_LEFT(tmp, field) == NULL || \ + RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) && \ + (RB_RIGHT(tmp, field) == NULL || \ + RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) { \ + RB_COLOR(tmp, field) = RB_RED; \ + elm = parent; \ + parent = RB_PARENT(elm, field); \ + } else { \ + if (RB_RIGHT(tmp, field) == NULL || \ + RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK) { \ + struct type *oleft; \ + if ((oleft = RB_LEFT(tmp, field)) != NULL) \ + RB_COLOR(oleft, field) = RB_BLACK; \ + RB_COLOR(tmp, field) = RB_RED; \ + RB_ROTATE_RIGHT(head, tmp, oleft, field); \ + tmp = RB_RIGHT(parent, field); \ + } \ + RB_COLOR(tmp, field) = RB_COLOR(parent, field); \ + RB_COLOR(parent, field) = RB_BLACK; \ + if (RB_RIGHT(tmp, field)) \ + RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK; \ + RB_ROTATE_LEFT(head, parent, tmp, field); \ + elm = RB_ROOT(head); \ + break; \ + } \ + } else { \ + tmp = RB_LEFT(parent, field); \ + if (RB_COLOR(tmp, field) == RB_RED) { \ + RB_SET_BLACKRED(tmp, parent, field); \ + RB_ROTATE_RIGHT(head, parent, tmp, field); \ + tmp = RB_LEFT(parent, field); \ + } \ + if ((RB_LEFT(tmp, field) == NULL || \ + RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) && \ + (RB_RIGHT(tmp, field) == NULL || \ + RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) { \ + RB_COLOR(tmp, field) = RB_RED; \ + elm = parent; \ + parent = RB_PARENT(elm, field); \ + } else { \ + if (RB_LEFT(tmp, field) == NULL || \ + RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) { \ + struct type *oright; \ + if ((oright = RB_RIGHT(tmp, field)) != NULL) \ + RB_COLOR(oright, field) = RB_BLACK; \ + RB_COLOR(tmp, field) = RB_RED; \ + RB_ROTATE_LEFT(head, tmp, oright, field); \ + tmp = RB_LEFT(parent, field); \ + } \ + RB_COLOR(tmp, field) = RB_COLOR(parent, field); \ + RB_COLOR(parent, field) = RB_BLACK; \ + if (RB_LEFT(tmp, field)) \ + RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK; \ + RB_ROTATE_RIGHT(head, parent, tmp, field); \ + elm = RB_ROOT(head); \ + break; \ + } \ + } \ + } \ + if (elm) \ + RB_COLOR(elm, field) = RB_BLACK; \ + } \ + \ + attr struct type *name##_RB_REMOVE(struct name *head, struct type *elm) { \ + struct type *child, *parent, *old = elm; \ + int color; \ + if (RB_LEFT(elm, field) == NULL) \ + child = RB_RIGHT(elm, field); \ + else if (RB_RIGHT(elm, field) == NULL) \ + child = RB_LEFT(elm, field); \ + else { \ + struct type *left; \ + elm = RB_RIGHT(elm, field); \ + while ((left = RB_LEFT(elm, field)) != NULL) \ + elm = left; \ + child = RB_RIGHT(elm, field); \ + parent = RB_PARENT(elm, field); \ + color = RB_COLOR(elm, field); \ + if (child) \ + RB_PARENT(child, field) = parent; \ + if (parent) { \ + if (RB_LEFT(parent, field) == elm) \ + RB_LEFT(parent, field) = child; \ + else \ + RB_RIGHT(parent, field) = child; \ + RB_AUGMENT(parent); \ + } else \ + RB_ROOT(head) = child; \ + if (RB_PARENT(elm, field) == old) \ + parent = elm; \ + (elm)->field = (old)->field; \ + if (RB_PARENT(old, field)) { \ + if (RB_LEFT(RB_PARENT(old, field), field) == old) \ + RB_LEFT(RB_PARENT(old, field), field) = elm; \ + else \ + RB_RIGHT(RB_PARENT(old, field), field) = elm; \ + RB_AUGMENT(RB_PARENT(old, field)); \ + } else \ + RB_ROOT(head) = elm; \ + RB_PARENT(RB_LEFT(old, field), field) = elm; \ + if (RB_RIGHT(old, field)) \ + RB_PARENT(RB_RIGHT(old, field), field) = elm; \ + if (parent) { \ + left = parent; \ + do { \ + RB_AUGMENT(left); \ + } while ((left = RB_PARENT(left, field)) != NULL); \ + } \ + goto color; \ + } \ + parent = RB_PARENT(elm, field); \ + color = RB_COLOR(elm, field); \ + if (child) \ + RB_PARENT(child, field) = parent; \ + if (parent) { \ + if (RB_LEFT(parent, field) == elm) \ + RB_LEFT(parent, field) = child; \ + else \ + RB_RIGHT(parent, field) = child; \ + RB_AUGMENT(parent); \ + } else \ + RB_ROOT(head) = child; \ + color: \ + if (color == RB_BLACK) \ + name##_RB_REMOVE_COLOR(head, parent, child); \ + return (old); \ + } \ + \ + /* Inserts a node into the RB tree */ \ + attr struct type *name##_RB_INSERT(struct name *head, struct type *elm) { \ + struct type *tmp; \ + struct type *parent = NULL; \ + int comp = 0; \ + tmp = RB_ROOT(head); \ + while (tmp) { \ + parent = tmp; \ + comp = (cmp)(elm, parent); \ + if (comp < 0) \ + tmp = RB_LEFT(tmp, field); \ + else if (comp > 0) \ + tmp = RB_RIGHT(tmp, field); \ + else \ + return (tmp); \ + } \ + RB_SET(elm, parent, field); \ + if (parent != NULL) { \ + if (comp < 0) \ + RB_LEFT(parent, field) = elm; \ + else \ + RB_RIGHT(parent, field) = elm; \ + RB_AUGMENT(parent); \ + } else \ + RB_ROOT(head) = elm; \ + name##_RB_INSERT_COLOR(head, elm); \ + return (NULL); \ + } \ + \ + /* Finds the node with the same key as elm */ \ + attr struct type *name##_RB_FIND(struct name *head, struct type *elm) { \ + struct type *tmp = RB_ROOT(head); \ + int comp; \ + while (tmp) { \ + comp = cmp(elm, tmp); \ + if (comp < 0) \ + tmp = RB_LEFT(tmp, field); \ + else if (comp > 0) \ + tmp = RB_RIGHT(tmp, field); \ + else \ + return (tmp); \ + } \ + return (NULL); \ + } \ + \ + /* Finds the first node greater than or equal to the search key */ \ + attr struct type *name##_RB_NFIND(struct name *head, struct type *elm) { \ + struct type *tmp = RB_ROOT(head); \ + struct type *res = NULL; \ + int comp; \ + while (tmp) { \ + comp = cmp(elm, tmp); \ + if (comp < 0) { \ + res = tmp; \ + tmp = RB_LEFT(tmp, field); \ + } else if (comp > 0) \ + tmp = RB_RIGHT(tmp, field); \ + else \ + return (tmp); \ + } \ + return (res); \ + } \ + \ + /* ARGSUSED */ \ + attr struct type *name##_RB_NEXT(struct type *elm) { \ + if (RB_RIGHT(elm, field)) { \ + elm = RB_RIGHT(elm, field); \ + while (RB_LEFT(elm, field)) \ + elm = RB_LEFT(elm, field); \ + } else { \ + if (RB_PARENT(elm, field) && \ + (elm == RB_LEFT(RB_PARENT(elm, field), field))) \ + elm = RB_PARENT(elm, field); \ + else { \ + while (RB_PARENT(elm, field) && \ + (elm == RB_RIGHT(RB_PARENT(elm, field), field))) \ + elm = RB_PARENT(elm, field); \ + elm = RB_PARENT(elm, field); \ + } \ + } \ + return (elm); \ + } \ + \ + /* ARGSUSED */ \ + attr struct type *name##_RB_PREV(struct type *elm) { \ + if (RB_LEFT(elm, field)) { \ + elm = RB_LEFT(elm, field); \ + while (RB_RIGHT(elm, field)) \ + elm = RB_RIGHT(elm, field); \ + } else { \ + if (RB_PARENT(elm, field) && \ + (elm == RB_RIGHT(RB_PARENT(elm, field), field))) \ + elm = RB_PARENT(elm, field); \ + else { \ + while (RB_PARENT(elm, field) && \ + (elm == RB_LEFT(RB_PARENT(elm, field), field))) \ + elm = RB_PARENT(elm, field); \ + elm = RB_PARENT(elm, field); \ + } \ + } \ + return (elm); \ + } \ + \ + attr struct type *name##_RB_MINMAX(struct name *head, int val) { \ + struct type *tmp = RB_ROOT(head); \ + struct type *parent = NULL; \ + while (tmp) { \ + parent = tmp; \ + if (val < 0) \ + tmp = RB_LEFT(tmp, field); \ + else \ + tmp = RB_RIGHT(tmp, field); \ + } \ + return (parent); \ + } + +#define RB_NEGINF -1 +#define RB_INF 1 + +#define RB_INSERT(name, x, y) CONCAT(name,_RB_INSERT(x, y)) +#define RB_REMOVE(name, x, y) CONCAT(name,_RB_REMOVE(x, y)) +#define RB_FIND(name, x, y) CONCAT(name,_RB_FIND(x, y)) +#define RB_NFIND(name, x, y) CONCAT(name,_RB_NFIND(x, y)) +#define RB_NEXT(name, x, y) CONCAT(name,_RB_NEXT(y)) +#define RB_PREV(name, x, y) CONCAT(name,_RB_PREV(y)) +#define RB_MIN(name, x) CONCAT(name,_RB_MINMAX(x, RB_NEGINF)) +#define RB_MAX(name, x) CONCAT(name,_RB_MINMAX(x, RB_INF)) + +#define RB_FOREACH(x, name, head) \ + for ((x) = RB_MIN(name, head); (x) != NULL; (x) = name##_RB_NEXT(x)) + +#define RB_FOREACH_FROM(x, name, y) \ + for ((x) = (y); ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); \ + (x) = (y)) + +#define RB_FOREACH_SAFE(x, name, head, y) \ + for ((x) = RB_MIN(name, head); \ + ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); (x) = (y)) + +#define RB_FOREACH_REVERSE(x, name, head) \ + for ((x) = RB_MAX(name, head); (x) != NULL; (x) = name##_RB_PREV(x)) + +#define RB_FOREACH_REVERSE_FROM(x, name, y) \ + for ((x) = (y); ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \ + (x) = (y)) + +#define RB_FOREACH_REVERSE_SAFE(x, name, head, y) \ + for ((x) = RB_MAX(name, head); \ + ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); (x) = (y)) + +#endif /* !_TREE_H_ */ diff --git a/semestr-5/so/lista5/so21_lista_5/listdir.c b/semestr-5/so/lista5/so21_lista_5/listdir.c new file mode 100644 index 0000000..9ae906c --- /dev/null +++ b/semestr-5/so/lista5/so21_lista_5/listdir.c @@ -0,0 +1,118 @@ +#include "csapp.h" + +#define DIRBUFSZ 256 + +static void print_mode(mode_t m) { + char t; + + if (S_ISDIR(m)) + t = 'd'; + else if (S_ISCHR(m)) + t = 'c'; + else if (S_ISBLK(m)) + t = 'b'; + else if (S_ISREG(m)) + t = '-'; + else if (S_ISFIFO(m)) + t = 'f'; + else if (S_ISLNK(m)) + t = 'l'; + else if (S_ISSOCK(m)) + t = 's'; + else + t = '?'; + + char ur = (m & S_IRUSR) ? 'r' : '-'; + char uw = (m & S_IWUSR) ? 'w' : '-'; + char ux = (m & S_IXUSR) ? 'x' : '-'; + char gr = (m & S_IRGRP) ? 'r' : '-'; + char gw = (m & S_IWGRP) ? 'w' : '-'; + char gx = (m & S_IXGRP) ? 'x' : '-'; + char or = (m & S_IROTH) ? 'r' : '-'; + char ow = (m & S_IWOTH) ? 'w' : '-'; + char ox = (m & S_IXOTH) ? 'x' : '-'; + + /* TODO: Fix code to report set-uid/set-gid/sticky bit as 'ls' does. */ + if (m & S_ISUID) ux = 's'; + if (m & S_ISGID) gx = 's'; + if (m & S_ISVTX) ox = 't'; + + printf("%c%c%c%c%c%c%c%c%c%c", t, ur, uw, ux, gr, gw, gx, or, ow, ox); +} + +static void print_uid(uid_t uid) { + struct passwd *pw = getpwuid(uid); + if (pw) + printf(" %10s", pw->pw_name); + else + printf(" %10d", uid); +} + +static void print_gid(gid_t gid) { + struct group *gr = getgrgid(gid); + if (gr) + printf(" %10s", gr->gr_name); + else + printf(" %10d", gid); +} + +static void file_info(int dirfd, const char *name) { + struct stat sb[1]; + + /* TODO: Read file metadata. */ + fstatat(dirfd, name, sb, AT_SYMLINK_NOFOLLOW); + + print_mode(sb->st_mode); + printf("%4ld", sb->st_nlink); + print_uid(sb->st_uid); + print_gid(sb->st_gid); + + /* TODO: For devices: print major/minor pair; for other files: size. */ + if (S_ISCHR(sb->st_mode) || S_ISBLK(sb->st_mode)) { + int mi = minor(sb->st_rdev); + int ma = major(sb->st_rdev); + printf(" %d,\t%d", mi, ma); + } + else { + printf("\t%ld", sb->st_size); + } + + char *now = ctime(&sb->st_mtime); + now[strlen(now) - 1] = '\0'; + printf("%26s", now); + + printf(" %s", name); + + if (S_ISLNK(sb->st_mode)) { + /* TODO: Read where symlink points to and print '-> destination' string. */ + char buf[300]; + size_t len = readlinkat(dirfd, name, buf, sizeof(buf)); + buf[len] = 0; + printf("-> %s", buf); + } + + putchar('\n'); +} + +int main(int argc, char *argv[]) { + if (!argv[1]) + argv[1] = "."; + + int dirfd = Open(argv[1], O_RDONLY | O_DIRECTORY, 0); + char buf[DIRBUFSZ]; + int n; + + while ((n = Getdents(dirfd, (void *)buf, DIRBUFSZ))) { + struct linux_dirent *d; + /* TODO: Iterate over directory entries and call file_info on them. */ + int offset = 0; + while (offset < n) { + d = (struct linux_dirent *)(buf + offset); + offset += d->d_reclen; + file_info(dirfd, d->d_name); + } + } + + Close(dirfd); + return EXIT_SUCCESS; +} diff --git a/semestr-5/so/lista5/so21_lista_5/mergesort.c b/semestr-5/so/lista5/so21_lista_5/mergesort.c new file mode 100644 index 0000000..b5328b6 --- /dev/null +++ b/semestr-5/so/lista5/so21_lista_5/mergesort.c @@ -0,0 +1,141 @@ +#include "csapp.h" + +typedef struct { + int child_fd; + int parent_fd; +} sockpair_t; + +static sockpair_t MakeSocketPair(void) { + int sv[2]; + Socketpair(AF_UNIX, SOCK_STREAM, 0, sv); + return (sockpair_t){.child_fd = sv[0], .parent_fd = sv[1]}; +} + +static bool MaybeReadNum(int fd, int *num_p) { + return Read(fd, num_p, sizeof(int)) == sizeof(int); +} + +static int ReadNum(int fd) { + int num; + if (Read(fd, &num, sizeof(int)) < sizeof(int)) + app_error("ReadNum error"); + return num; +} + +static void WriteNum(int fd, int num) { + if (Write(fd, &num, sizeof(int)) < sizeof(int)) + app_error("WriteNum error"); +} + +static void SendElem(int parent_fd, int child_fd, int nelem) { + WriteNum(child_fd, nelem); + for (int i = 0; i < nelem; i++) + WriteNum(child_fd, ReadNum(parent_fd)); +} + +static void Merge(int left_fd, int right_fd, int parent_fd) { + bool has_left = true; + bool has_right = true; + int left = ReadNum(left_fd); + int right = ReadNum(right_fd); + + do { + if ((has_left && has_right) ? left < right : has_left) { + WriteNum(parent_fd, left); + has_left = MaybeReadNum(left_fd, &left); + } else { + WriteNum(parent_fd, right); + has_right = MaybeReadNum(right_fd, &right); + } + } while (has_left || has_right); +} + +static void Sort(int parent_fd) { + int nelem = ReadNum(parent_fd); + + if (nelem < 2) { + WriteNum(parent_fd, ReadNum(parent_fd)); + Close(parent_fd); + return; + } + + sockpair_t left = MakeSocketPair(); + + int left_fd = left.parent_fd; + int lnelem = nelem/2; + + if (Fork()) { + Close(left.child_fd); + SendElem(parent_fd, left_fd, lnelem); + } + else { + Close(left.parent_fd); + Sort(left.child_fd); + return; + } + + sockpair_t right = MakeSocketPair(); + /* TODO: Spawn right child. */ + int right_fd = right.parent_fd; + int rnelem = nelem - nelem/2; + + if (Fork()) { + Close(right.child_fd); + SendElem(parent_fd, right_fd, rnelem); + } + else { + Close(right.parent_fd); + Sort(right.child_fd); + return; + } + + /* TODO: Send elements to children and merge returned values afterwards. */ + Merge(left_fd, right_fd, parent_fd); + + /* Wait for both children. */ + Wait(NULL); + Wait(NULL); +} + +static int GetNumber(void) { + char buf[20]; + if (fgets(buf, sizeof(buf), stdin) == NULL) + app_error("GetNumber error"); + return strtol(buf, NULL, 10); +} + +int main(void) { + sockpair_t sort = MakeSocketPair(); + + if (Fork()) { + /* parent */ + int nelem = GetNumber(); + if (nelem < 2) + app_error("Number of sorted elements must be at least 2!\n"); + Close(sort.child_fd); + + /* Write unsorted numbers to mergesort */ + WriteNum(sort.parent_fd, nelem); + for (int i = 0; i < nelem; i++) { + WriteNum(sort.parent_fd, GetNumber()); + } + + /* Read sorted numbers from mergesort */ + int prev = INT_MIN; + for (int i = 0; i < nelem; i++) { + int elem = ReadNum(sort.parent_fd); + fprintf(stderr, "%d\n", elem); + assert(prev <= elem); + prev = elem; + } + Close(sort.parent_fd); + + Wait(NULL); + } else { + /* child */ + Close(sort.parent_fd); + Sort(sort.child_fd); + } + + return 0; +} diff --git a/semestr-5/so/lista5/so21_lista_5/prime.c b/semestr-5/so/lista5/so21_lista_5/prime.c new file mode 100644 index 0000000..80ed3c6 --- /dev/null +++ b/semestr-5/so/lista5/so21_lista_5/prime.c @@ -0,0 +1,97 @@ +#include "csapp.h" + +typedef struct { + int read; + int write; +} pipe_t; + +static inline pipe_t MakePipe(void) { + int fds[2]; + Pipe(fds); + return (pipe_t){.read = fds[0], .write = fds[1]}; +} + +static inline void CloseReadEnd(pipe_t p) { + Close(p.read); +} + +static inline void CloseWriteEnd(pipe_t p) { + Close(p.write); +} + +static bool ReadNum(pipe_t p, long *valp) { + return Read(p.read, valp, sizeof(long)) == sizeof(long); +} + +static bool WriteNum(pipe_t p, long val) { + return Write(p.write, &val, sizeof(long)) == sizeof(long); +} + +static noreturn void generator(pipe_t out, long maxprime) { + for (long n = 2; n <= maxprime; n++) + WriteNum(out, n); + exit(EXIT_SUCCESS); +} + +static void filter(pipe_t in, pipe_t out, long prime) { + long num; + while (ReadNum(in, &num)) { + if (num % prime != 0) + WriteNum(out, num); + } +} + +static noreturn void filter_chain(pipe_t in) { + long prime; + + /* TODO: Something is missing here! */ + pipe_t out = MakePipe(); + if (!ReadNum(in, &prime)) { + exit(EXIT_SUCCESS); + } + printf("%ld\n", prime); + if (Fork()) { /* parent */ + close(out.read); + filter(in, out, prime); + close(out.write); + close(in.read); + Wait(NULL); + } else { /* child */ + close(out.write); + close(in.read); + filter_chain(out); + } + + exit(EXIT_SUCCESS); +} + +int main(int argc, char *argv[]) { + if (argc != 2) + app_error("Usage: %s [MAXPRIME]", argv[0]); + + long maxprime = atol(argv[1]); + + if (maxprime < 2 || maxprime > 10000) + app_error("Give maximum prime number in range from 2 to 10000!"); + + /* Spawn generator. */ + pipe_t gen_pipe = MakePipe(); + if (Fork()) { /* parent */ + CloseWriteEnd(gen_pipe); + } else { /* child */ + CloseReadEnd(gen_pipe); + generator(gen_pipe, maxprime); + } + + /* Spawn filter chain. */ + if (Fork()) { /* parent */ + CloseReadEnd(gen_pipe); + } else { /* child */ + filter_chain(gen_pipe); + } + + for (int i = 0; i < 2; i++) + Wait(NULL); + + return 0; +} diff --git a/semestr-5/so/lista6/so21_lista_6.pdf b/semestr-5/so/lista6/so21_lista_6.pdf new file mode 100644 index 0000000..86a8dfa Binary files /dev/null and b/semestr-5/so/lista6/so21_lista_6.pdf differ diff --git a/semestr-5/so/lista6/so21_lista_6.tar.gz b/semestr-5/so/lista6/so21_lista_6.tar.gz new file mode 100644 index 0000000..5b33fe5 Binary files /dev/null and b/semestr-5/so/lista6/so21_lista_6.tar.gz differ diff --git a/semestr-5/so/so-shell b/semestr-5/so/so-shell new file mode 160000 index 0000000..4e715c1 --- /dev/null +++ b/semestr-5/so/so-shell @@ -0,0 +1 @@ +Subproject commit 4e715c1841c385d40528880457183915eb5261ef -- cgit v1.2.3