<div dir="ltr"><div><br></div><div>I posted to python-list about the matter here:<br></div><div><a href="https://mail.python.org/pipermail/python-list/2022-March/905735.html">https://mail.python.org/pipermail/python-list/2022-March/905735.html</a></div><div><br></div><div>...but it may be more relevant to strace-devel.</div><div><br></div><div>Thanks for reading!</div><div><br></div><div>Here's the text of the python-list post:</div><div><br></div><div>Hi folks.<br><br>First off, I know, python2 is ancient history.  Porting to 3.x is on my<br>list of things to do (though I'm afraid it's not yet at the top of the<br>list), and the same thing happens with python3.<br><br>So anyway, I'm strace'ing a #!/usr/bin/python2 script.<br><br>I expected to see an exec of /usr/bin/python2, but I don't.  I just see an<br>exec of /tmp/t.<br><br>As follows:<br>tact at celery_worker:/app$ strace -f -s 1024 -o /tmp/t.strace /tmp/t<br>^Z<br>[1]+  Stopped                 strace -f -s 1024 -o /tmp/t.strace /tmp/t<br>tact at celery_worker:/app$ bg<br>[1]+ strace -f -s 1024 -o /tmp/t.strace /tmp/t &<br>tact at celery_worker:/app$ ps axf<br>  PID TTY      STAT   TIME COMMAND<br> 1163 pts/0    Ss     0:00 bash<br> 1363 pts/0    S      0:00  \_ strace -f -s 1024 -o /tmp/t.strace /tmp/t<br> 1366 pts/0    S      0:00  |   \_ /usr/bin/python2 /tmp/t<br> 1367 pts/0    R+     0:00  \_ ps axf<br>tact at celery_worker:/app$ fg<br>bash: fg: job has terminated<br>[1]+  Done                    strace -f -s 1024 -o /tmp/t.strace /tmp/t<br>tact at celery_worker:/app$ grep execve /tmp/t.strace<br>1366  execve("/tmp/t", ["/tmp/t"], 0x7ffd89f9c3b8 /* 49 vars */) = 0<br>tact at celery_worker:/app$<br><br>I've deleted some irrelevant processes from the 'ps axf'.<br><br>/tmp/t is actually just:<br>tact at celery_worker:/app$ cat /tmp/t<br>#!/usr/bin/python2<br><br>import time<br><br>time.sleep(10)<br><br><br>Was this some sort of security feature I never heard about?  I'm tracing a<br>very simple time.sleep(10) here, but the same thing is (not) happening in a<br>larger script that I need to track down a bug in.<br><br>Is there a way I can coax Linux and/or strace to show all the exec's, like<br>they used to?  Not having them makes me wonder what else is missing from<br>the strace report.<br><br>I'm on a Debian 11.2 system with strace 5.10 and Python 2.7.18.<br><br>Thanks!</div></div>