This piece of Python code has hung my whole system, does anyone know?

My host system is OpenSuse 13.2 and I am running FreeBsd 10.1 on vagrant

when i ran the following code on Freebsd 10.1 running on vagrant, not just freebsd, but the host system freezes and I had to manually press the power button to shutdown.

#!/usr/local/bin/python3
import os,subprocess
subprocess.Popen("cd /usr/local/ && sh",shell=True)

      

on the freebsd output

$ ps $$

is an

TIME PARAMETERS PID TT

900 0 Ss 0: 00.47 -sh (sh)

+3


source to share


1 answer


I strongly doubt the hang was script related. It wouldn't hang the OS, and it certainly wouldn't hang the host.

I just ran this "script" here without any negative consequences. Chances are you had an issue with your roving host (hardware error?) That matched you when you ran the script.



Have you tried it again - after the owner returned?

0


source







All Articles