08425ff0801d37238657c6f7135cde092c550e67,pysos/actions.py,SoS_ExecuteScript,run,#SoS_ExecuteScript#,427

Before Change


                    // need to catch output and send to python output, which will in trun be hijacked by SoS notebook
                    p = subprocess.Popen(cmd, shell=True, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
                    pid = p.pid
                    m = ProcessMonitor(pid, msg=self.script)
                    m.start()
                    env.register_process(p.pid, "Runing {}".format(script_file))
                    out, err = p.communicate()
                    sys.stdout.write(out.decode())
                    sys.stderr.write(err.decode())

After Change


                    p = subprocess.Popen(cmd, shell=True)
                    pid = p.pid
                    if "__step_sig__" in env.sos_dict and env.sos_dict["__step_sig__"] is not None:
                        m = ProcessMonitor(pid, msg=self.script, sig=env.sos_dict["__step_sig__"])
                        m.start()
                    env.register_process(pid, "Runing {}".format(script_file))
                    ret = p.wait()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: vatlab/SoS
Commit Name: 08425ff0801d37238657c6f7135cde092c550e67
Time: 2016-11-07
Author: ben.bog@gmail.com
File Name: pysos/actions.py
Class Name: SoS_ExecuteScript
Method Name: run


Project Name: dmlc/dgl
Commit Name: e4ef8d1a80a922a5798268d4f31ff758b45620cb
Time: 2019-12-24
Author: mctt90@gmail.com
File Name: examples/pytorch/dis_kvstore/server.py
Class Name:
Method Name: start_server


Project Name: dmlc/dgl
Commit Name: e4ef8d1a80a922a5798268d4f31ff758b45620cb
Time: 2019-12-24
Author: mctt90@gmail.com
File Name: examples/mxnet/dis_kvstore/server.py
Class Name:
Method Name: start_server


Project Name: akkana/scripts
Commit Name: e1e3f45530006843db21dc084f2dde2725056168
Time: 2018-06-24
Author: akkana@shallowsky.com
File Name: quickbrowse.py
Class Name:
Method Name: