linux - python subprocess module can't execute shell -
[root@localhost root]$ cat test.c #include <stdio.h> int main(int argc, char*argv[]){ system("/bin/sh"); } [root@localhost root]$ cat auto #!/usr/bin/env python subprocess.popen(['/root/test']) i want use subprocess executing new shell command line
but it's closed don't know why..
what should continuing new shell command line?
if there way same thing instead of subprocess module, please let me know :)
sorry poor english
subprocess needs imported:
#!/usr/bin/env python import subprocess subprocess.popen(['/root/test'])
Comments
Post a Comment