OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

How to stream the interactive shell of a remote program to stdout of a running c++ program that launched the remote program (using BSUB -I mode)

  • Thread starter Thread starter bdd
  • Start date Start date
B

bdd

Guest
I have a C++ program (say, process P1) which, in its course of execution, spawns a new process P2 on a remote machine using a launcher like LSF. P2 has an interactive shell (could be python). I want the user at P1 to use this interactive shell of P2 for a while and then exit P2 when done. P1 continues from here and may spawn other interactive shells in future. All the while P1 either continued in the background or was blocked (does not matter at the moment). It is necessary that a local program like P1 only spawns P2 as it could spawn other processes based on certain conditions. Also, P1 could relaunch P2 in the event of P2 crashing. All the processes are running on Linux environment.
Launching bsub -Ip P2 using popen does not stream the shell of P2 to P1's stdout. It just shows that the program was started on a certain machine.
If the streaming is not possible, is there an alternate way to handle such a scenario.
<p>I have a C++ program (say, process P1) which, in its course of execution, spawns a new process P2 on a remote machine using a launcher like LSF. P2 has an interactive shell (could be python). I want the user at P1 to use this interactive shell of P2 for a while and then exit P2 when done. P1 continues from here and may spawn other interactive shells in future. All the while P1 either continued in the background or was blocked (does not matter at the moment). It is necessary that a local program like P1 only spawns P2 as it could spawn other processes based on certain conditions. Also, P1 could relaunch P2 in the event of P2 crashing. All the processes are running on Linux environment.<br />
Launching <code>bsub -Ip P2</code> using <code>popen</code> does not stream the shell of P2 to P1's stdout. It just shows that the program was started on a certain machine.<br />
If the streaming is not possible, is there an alternate way to handle such a scenario.</p>
 

Latest posts

H
Replies
0
Views
1
haifisch123
H
A
Replies
0
Views
1
Adrian-Mihai Enache
A
H
Replies
0
Views
1
Hür Doğan ÜNLÜ
H
Top