def run(self, command):
        with Dir.cd(self.working_dir):
            self.process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=self.path, shell=True, preexec_fn=self._preexec_val())
            self.pid = self.process.pid

        self.last_command = command.rstrip()
        ProcessCache.add(self)
        return self
    def run(self, command):
        with Dir.cd(self.working_dir):
            self.process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=self.path, shell=True, preexec_fn=self._preexec_val())
            self.pid = self.process.pid

        self.last_command = command.rstrip()
        ProcessCache.add(self)
        return self
示例#3
0
 def load_process_cache():
     for process in ProcessCache.get_from_storage():
         ProcessCache.add(
             CrossPlatformProcess(process['workding_dir'], process['last_command'], process['pid'])
         )
示例#4
0
文件: gulp.py 项目: wufeishow/sublime
 def load_process_cache():
     for process in ProcessCache.get_from_storage():
         ProcessCache.add(
             CrossPlatformProcess(process['workding_dir'],
                                  process['last_command'], process['pid']))