Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1682 connectés 

  FORUM HardWare.fr
  Programmation
  Ada

  [Ada][Gnu/Linux][Xterm] Non_Blocking_Spawn: la commande n'est executée

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

[Ada][Gnu/Linux][Xterm] Non_Blocking_Spawn: la commande n'est executée

n°2201726
Profil sup​primé
Posté le 04-09-2013 à 13:11:34  answer
 

Bonjour,
 
Merci pour vos réponses;
La commande n'est pas exécutée, la fenêtre se ferme immédiatement.
Voici l'appel à Gnat.OS_Lib.Non_Blocking_Spawn :

Code :
  1. --
  2.        declare
  3.             Xterm_Id                    : Os_Lib.Process_Id;
  4.          
  5.            Xterm_Parameters            : Os_Lib.Argument_List_Access :=
  6.              new Os_Lib.Argument_List ' (new String ' ("-e" ),
  7.                                          new String ' ("/bin/bash" ),
  8.                                          new String ' ("-c" ),
  9.                                          new String ' ("/usr/bin/xborg " & Hostname.all & ' ' & Logname.all & ' ' & Password.all));
  10.  
  11.         begin
  12.            Os_Lib.Normalize_arguments(Xterm_Parameters.all);
  13.            Xterm_Id := Os_Lib.Non_Blocking_Spawn(Program_Name => Os_Lib.Normalize_Pathname("/usr/bin/xterm" ),
  14.                                                  Args => Xterm_Parameters.all);
  15.  
  16.            delay 1.0;
  17.         end;


 
 
j'ai donc essayé deux paramètres :
 

Code :
  1. Xterm_Parameters            : Os_Lib.Argument_List_Access :=
  2.              new Os_Lib.Argument_List ' (new String ' ("-e" ),
  3.                                          new String ' ("/bin/bash" ),
  4.                                          new String ' ("-l" ),
  5.                                          new String ' ("-c" ),
  6.                                          new String ' ("""" ),
  7.                                          new String ' (Xborg_Location),
  8.                                          new String ' (Hostname.all),
  9.                                          new String ' (Logname.all),
  10.                                          new String ' (Password.all),
  11.                                          new String ' ("""" ));


 
Voilà, celui qui trouve à une bise de sa femme ou son copain, j'en sais rien.
 
Sachant que le premier code renferme une solution qui marchais.
 
Merci pour vos réponses.
 
Et Ada, ça s'écrira toujours Ada !  [:pingouinator]  

mood
Publicité
Posté le 04-09-2013 à 13:11:34  profilanswer
 

n°2201734
Profil sup​primé
Posté le 04-09-2013 à 13:37:27  answer
 

Ahhhhh ! Pinaise, ça fat 2 jours que je cherche dans le second argument, et le premier fonctionne si je met le bon chemin d'accès.
Voilà. Merci Forum.HArdware.fr


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  Ada

  [Ada][Gnu/Linux][Xterm] Non_Blocking_Spawn: la commande n'est executée

 

Sujets relatifs
Lancer un script Python Par la commande Batch "SCHTASKS"Executer un script python par la commande Batch SCHTASKS
Impossible d'executer script linux sous PHPafficher "/?" via la commande ECHO
Ouverture Terminal Linux + Ligne de commande[Topic unic][Ada][Gnu/Linux] La programmation pas à pas.
Probleme JAVA en ligne de commande 
Plus de sujets relatifs à : [Ada][Gnu/Linux][Xterm] Non_Blocking_Spawn: la commande n'est executée


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR