I'm trying to run some command in container through lxc-attach. The script
is in python 2.7. Apparently, command like following does not raise a
subprocess exception:
subprocess.check_output('lxc-attach -n c1 -- ls non_exist_dir')

One way to get the stderr from the ls command running in container could be
using -o option to direct the stderr to a local log file, then parse the
log file to see any errors. It's not really a clean solution. I'm wondering
if there is a better way to do this?

Thanks,
Dan
_______________________________________________
lxc-users mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-users

Reply via email to