Timeline for Change the parent process of a process?
Current License: CC BY-SA 3.0
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 3, 2016 at 0:13 | comment | added | Arcege |
I can't speak well for emacs; haven't really used it in 25 years. As far as I remember, it connected to an already running emacs process, so it wasn't able to run in the background like screen. To answer your first question: Yes, there is a UNIX domain socket that is used to access the server SCREEN process. Some systems have it in /tmp/screen/ others may be in /var/run/screen; when you run screen -ls, you'll see the directory ("1 Socket in /path/to/directory").
|
|
| Feb 29, 2016 at 6:37 | comment | added | Tim |
Thanks. Arcege. (1) Do screen daemon and ui communicate by interprocess communication (such as socket)? Does screen daemon runs a server, and a screen ui runs a client? (2) For emacs, does an emacs server run as a daemon, and an emacs client run as a ui? (3) Do screen (daemon and ui) and emacs (server and client) work in the same way?
|
|
| Feb 29, 2016 at 6:32 | vote | accept | Tim | ||
| Apr 8, 2015 at 15:25 | comment | added | Arcege |
Nothing happens to the subprocesses, they continue on as nothing has changed for them. If you are reattaching, then yes, the same server process and subprocesses will be connected to. You can tell screen to create a new session with new subprocesses, but then you wouldn't be reconnecting. Most of the reference is the source code itself. There is an info doc (info screen) with a bit more information, but not to the depth in this discussion.
|
|
| Apr 6, 2015 at 18:22 | comment | added | Tim | Thanks, Arcege! (1) When detach a screen session (reattachable later), what happen to the subprocess(es) running in the screen session and the screen session process? (2) when reattach a detached screen session, are the reattached screen session process and its subprocess(es) are the same as those before detaching? (3) Do you have some reference about what you said about screen, its manual doesn't say things like that, or I miss it? | |
| Apr 2, 2015 at 15:47 | comment | added | JdeBP | The parent process ID does not always become 1. This received wisdom absolutism has been wrong for over 3 years, now. | |
| Apr 2, 2015 at 2:37 | comment | added | Arcege | The server would listen on a socket (usually a UNIX domain socket file) waiting for connections. The client(s) would open a connection on that socket. Tabs are irrelevant to the communication between the client and the server, it could different tabs, different teminal emulates (xterm vs rxvt vs terminal), or could be xemacs. Each client knows where to connect, so it could be from anywhere. | |
| Apr 2, 2015 at 2:02 | comment | added | Tim | How does Emacs attach a client to a server in different terminal tabs? | |
| Apr 2, 2015 at 1:37 | comment | added | Arcege |
Every process has only one parent, until either the parent dies or it dies. If it dies, the point is moot. If the parent dies, then the PPID becomes 1, the init process. This is the only time the parent process would change - when the parent process terminates. Connecting via interprocess communication (pipes, sockets, etc.) has no affect on the PPID.
|
|
| Apr 2, 2015 at 0:51 | comment | added | Tim | Thanks. I added "Emacs client can attach to emacs server on a different terminal tab. Is there change of parent process?" | |
| Apr 1, 2015 at 22:05 | history | answered | Arcege | CC BY-SA 3.0 |