Python Forum
why did python run in this case?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
why did python run in this case?
#1
i was trying to run a big command in a bash shell in a non-root user under Xubuntu 20.04 involving a bash loop, system binary commands, and one binary command i wrote in C and compiled to binary (and have used quite often over the years). this big command took longer than expected so i wanted to try something else. i pressed ^C and got a message that appeared to come from Python. any clue what it could have been run for?

Output:
lt1a/phil/9 /home/phil 8> time(rls +f /usr|egrep '\.h$'|while read f;do fgrep -n ' O_PATH' "$f" /dev/null;done) /usr/include/asm-generic/fcntl.h:84:#ifndef O_PATH /usr/include/asm-generic/fcntl.h:85:#define O_PATH 010000000 /usr/include/linux/un.h:14:#define SIOCUNIXFILE (SIOCPROTOPRIVATE + 0) /* open a socket file with O_PATH */ /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:150:# define O_PATH __O_PATH /* Resolve pathname but do not open file. */ /usr/src/linux-hwe-5.15-headers-5.15.0-60/arch/alpha/include/uapi/asm/fcntl.h:35:#define O_PATH 040000000 /usr/src/linux-hwe-5.15-headers-5.15.0-60/arch/parisc/include/uapi/asm/fcntl.h:20:#define O_PATH 020000000 /usr/src/linux-hwe-5.15-headers-5.15.0-60/arch/sparc/include/uapi/asm/fcntl.h:38:#define O_PATH 0x1000000 ^CFatal Python error: init_import_size: Failed to import the site module Python runtime state: initialized Traceback (most recent call last): File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 671, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 844, in exec_module File "<frozen importlib._bootstrap_external>", line 976, in get_code File "<frozen importlib._bootstrap_external>", line 640, in _compile_bytecode KeyboardInterrupt ^C[[ 2m23s real 143.994 - user 109.758 - sys 35.694 - 101.01% ]] lt1a/phil/9 /home/phil 9>
after a few messages it paused for a while and i pressed ^C again and got "KeyboardInterrupt" and then it quit with timing info from the time prefix on the shell loop. i'm just curious WHY Python was running. what it was doing might be helpful to know. any clues?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
why did python run in this case? - by Skaperen - Mar-23-2023, 05:50 PM
RE: why did python run in this case? - by Skaperen - Mar-23-2023, 10:36 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  The Case Against Python 3 snippsat 15 16,014 Nov-25-2016, 07:44 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020