From: "Aurélien Aptel" <aurelien.aptel+emacs@gmail.com>
To: Thorsten Jolitz <tjolitz@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: How to communicate with a running external process with given PID?
Date: Mon, 22 Jul 2013 16:42:33 +0200 [thread overview]
Message-ID: <CA+5B0FMcahyMT6Etd7gbebDcroVvi6VmMO1tjmsg96atMneGmg@mail.gmail.com> (raw)
In-Reply-To: <87txjmy97l.fsf@gmail.com>
On Mon, Jul 22, 2013 at 4:12 PM, Thorsten Jolitz <tjolitz@gmail.com> wrote:
>> Since Emacs did not start the external process, it does not have
>> access to its standard input stream -- unless your OS provides a way
>> to do that (e.g. via a special /dev file).
>>
>> How would you communicate with the external process, from any other
>> program?
>
> I don't know, and I interpreted the responses so far to my post as "it
> is impossible, only 'kill' can access the running external process with
> given PID" - but kill sends signals, no command-strings or so.
Kevin is right in that on Linux you can use /proc/$PID/fd/0 and 1 to
access the file descriptor of the stdin and stdout of the program
$PID. Actually, it's the input/output of the controlling terminal
which means you have to use some tricks [1] to communicate with the
process.
1: http://stackoverflow.com/questions/5374255/how-to-write-data-to-existing-processs-stdin-from-external-process?lq=1
next prev parent reply other threads:[~2013-07-22 14:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-20 9:06 How to communicate with a running external process with given PID? Thorsten Jolitz
2013-07-22 13:02 ` Kevin Rodgers
2013-07-22 14:12 ` Thorsten Jolitz
2013-07-22 14:42 ` Aurélien Aptel [this message]
[not found] ` <mailman.1562.1374504168.12400.help-gnu-emacs@gnu.org>
2013-07-22 18:16 ` Pascal J. Bourguignon
[not found] <mailman.1456.1374311231.12400.help-gnu-emacs@gnu.org>
2013-07-20 10:51 ` Pascal J. Bourguignon
2013-07-22 16:52 ` Rustom Mody
2013-07-22 18:18 ` Pascal J. Bourguignon
2013-07-23 4:44 ` Rustom Mody
2013-07-20 10:52 ` Pascal J. Bourguignon
2013-07-20 11:57 ` Thorsten Jolitz
[not found] ` <mailman.1462.1374321447.12400.help-gnu-emacs@gnu.org>
2013-07-20 14:09 ` Pascal J. Bourguignon
2013-07-22 8:06 ` Thorsten Jolitz
2013-07-22 8:22 ` Aurélien Aptel
2013-07-22 9:43 ` Thorsten Jolitz
2013-07-22 14:15 ` Aurélien Aptel
2013-07-23 7:19 ` Thorsten Jolitz
[not found] ` <mailman.1547.1374486226.12400.help-gnu-emacs@gnu.org>
2013-07-22 18:14 ` Pascal J. Bourguignon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+5B0FMcahyMT6Etd7gbebDcroVvi6VmMO1tjmsg96atMneGmg@mail.gmail.com \
--to=aurelien.aptel+emacs@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=tjolitz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.