attach to process by pid?
James Mills
prologic at shortcircuit.net.au
Thu Mar 10 18:22:03 EST 2011
More information about the Python-list mailing list
Thu Mar 10 18:22:03 EST 2011
- Previous message (by thread): attach to process by pid?
- Next message (by thread): attach to process by pid?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, Mar 11, 2011 at 8:55 AM, Alexander Kapps <alex.kapps at web.de> wrote: > On 10.03.2011 23:25, Nobody wrote: > Unless I misunderstand something, it is possible (at least on Linux): > > Two terminal windows: > > 1: > alex at frittenbude:~$ grep foobar > > 2: > alex at frittenbude:~$ ps ax|grep 'grep foobar' > 13075 pts/4 S+ 0:00 grep --color=auto grep foobar > alex at frittenbude:~$ echo foobar > /proc/13075/fd/0 This works fine on the Linux platform (perhaps other UNIX-like platforms have similar concepts). You're simply writing to the processes's stdin (file descriptor of 0) Probably not a portable solution. cheers James -- -- James Mills -- -- "Problems are solved by method"
- Previous message (by thread): attach to process by pid?
- Next message (by thread): attach to process by pid?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list