question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to handle more than one pty child process fork?

See original GitHub issue

I’m in a situation where I have to create child pty fork for each user session. I exactly followed your approach and it’s working great but text delay (while on emitting the pty output) happens if more than 3 sessions got opened (in the background it created three child processes). Please help me to overcome this situation. Does making use of async func would help? or do we have to use any low level functions like os.wait() or os.waitpid() ?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
cs01commented, Apr 3, 2019

Glad you got it working!

The number of lines of history is configurable in xtermjs. See https://xtermjs.org/docs/api/terminal/interfaces/iterminaloptions/#scrollback.

0reactions
Avinash-Rajcommented, Apr 3, 2019

Thanks, it got speeds up when changed the timeout to 0 sec.Another issue is, I can view only 4 or 5 lines on moving the scroll bar up. It fails to move further upwards. You may test this by writing 1000 lines on terminal. You can’t reach the 1st line after done writing 1000 lines.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to handle more than one pty child process fork? #5 - GitHub
I'm in a situation where I have to create child pty fork for each user session. I exactly followed your approach and it's...
Read more >
Multiple child process - Stack Overflow
You can do this with fork. A given parent can fork as may times as it wants. However, I ...
Read more >
Creating multiple process using fork() - GeeksforGeeks
An existing process can create a new one by calling the fork( ) function. The new process created by fork() is called the...
Read more >
Creating child process using fork() in Python - Tutorialspoint
Our task is to create a child process and display process id of both parent and child process using fork() function in Python....
Read more >
fork(2) - Linux manual page - man7.org
fork () creates a new process by duplicating the calling process. The new process is referred to as the child process. The calling...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found