Anomalie #7609
terminal sans capacité à mettre à une colonne fait planter 'instance'
Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
-
Version cible:
Début:
Echéance:
21/03/2014
% réalisé:
100%
Distribution:
EOLE 2.4
Description
lancer par
python monitor_instance.py
./monitor_instance1.sh
#!/bin/bash instance --debug 2>&1
./monitor_instance.py
#!/usr/bin/env python from subprocess import Popen, PIPE, STDOUT import pty import os import select def doInstance(): master, slave = pty.openpty() process = Popen( ['./monitor_instance1.sh'], shell=True, bufsize=0, stdout=slave, stderr=STDOUT, close_fds=True) while 1: ready, _, _ = select.select([master], [], [], .04) if ready: data = os.read(master, 512) if not data: break data = data.strip().rstrip() print("mon:-" + data + '-') elif process.poll() is not None: # select timeout break # proc exited os.close(slave) os.close(master) process.wait() if __name__ == '__main__': doInstance()
Révisions associées
pyeole/ihm.py : ne plus planter si le TERM ne support pas les colonnes (fixes #7609)
Historique
#1 Mis à jour par Emmanuel GARETTE il y a environ 10 ans
- Projet changé de creole à eole-common
- Echéance mis à 21/03/2014
- Assigné à mis à Emmanuel GARETTE
- Version cible changé de 189 à Eole 2.4-RC3
#2 Mis à jour par Emmanuel GARETTE il y a environ 10 ans
- Statut changé de Nouveau à Résolu
- % réalisé changé de 0 à 100
Appliqué par commit python-pyeole:6b0eae86f7f2e8fe7eeefc0edf868da5c70b81a1.
#3 Mis à jour par Emmanuel GARETTE il y a environ 10 ans
- Statut changé de Résolu à Fermé
C'est OK avec les deux scripts donnés.