简体   繁体   中英

There is any way to transfer a child linux process to another process?

If i have an zsh terminal with a child process in it, there is any way to transfer this process to another zsh session?

Example: I have a tmux session with two panels, two zsh process and a htop process on the first session, there is some way to pass this process to the second zsh session?

This image can illustrate the situation:

在此处输入图片说明

I've tried ctrl+z to send the process to background and fg %1 on other session but this doesn't work, apparently because the background processing is managed by the zsh session I think...

There is some way to transfer one child process to another process?

It's not possible in common case: child process belong to parent. But you can use screen or something like this to share commands output between sessions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM