This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Child PID
- From: Brian.Inglis <Brian dot Inglis at SystematicSw dot ab dot ca>
- To: cygwin at cygwin dot com
- Date: Fri, 14 Feb 2014 07:04:35 +0000 (UTC)
- Subject: Re: Child PID
- Authentication-results: sourceware.org; auth=none
- References: <52FD13AE dot 5070108 at mail dot com>
Todd Poole <tpoole <at> mail.com> writes:
>
> I am in process of trying to process dumper on a pid. The pid I need to
> dump is a child of another program. If I use ps -W from command line and
> use the pid associated with the child all is well. I need it to be
> executed from a script. I have tried the following:
>
> Firefox &
> set plugin-container.exe
> dumper $PID $(ps -W | awk "/plugin-container.exe/,NF=8")
>
> Firefox is the parent that is opening. I have tried to isolate the child
> (plugin-container.exe) from the Command and get the pid but have not
> been successful. The PID is coming from the parent. Any suggestions
> greatly appreciaed.
> Thanks
>
Try this approach to access a page using a plugin requiring the container:
cygstart http://bbc.co.uk
winpid=''
while [ -z "$winpid" ]
do
winpid=$(ps -W | awk '/plugin-container/ { print $4 ; print $0 >
"/dev/stderr" }')
sleep 1
done
echo dumper plugin-container $winpid
dumper plugin-container $winpid
ls -gGho *.core
output:
5884 0 0 5884 ? 0 23:50:02 C:\Program Files
(x86)\Mozilla Firefox\plugin-container.exe
dumper plugin-container 5884
-rw-r--r--+ 1 120M Feb 13 23:51 plugin-container.core
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple