3

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

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

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

on freebsd output of

$ ps $$

is

PID TT STAT TIME COMMAND

900 0 Ss 0:00.47 -sh (sh)

Rajdeep Sharma
  • 463
  • 1
  • 5
  • 9
  • What are you trying to accomplish by opening a shell from Python? Use the appropriate commands from for example `os` instead. – Roland Smith Aug 08 '15 at 22:49

1 Answers1

0

I strongly doubt, the hang was due to the script. It would not hang the OS, and it most certainly would not hang the host.

I just ran this "script" here without any ill-effects. Most likely you had a problem with your vagrant-host (hardware error?), which happened to coincide with you running the script.

Have you tried it again -- after the host came back?

Mikhail T.
  • 3,043
  • 3
  • 29
  • 46