diff options
author | Dan Gudmundsson <[email protected]> | 2012-04-16 14:05:07 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2012-04-27 12:47:48 +0200 |
commit | 512ef9d925bc71b6a937e9936e99929cb59f32bf (patch) | |
tree | 07b6b09e2a19293b47c7d432b16ef1fba6894d11 /lib/observer/src/observer_pro_wx.erl | |
parent | 44dc3ac8d9c91436e139b24bf798f0f8262cdca5 (diff) | |
download | otp-512ef9d925bc71b6a937e9936e99929cb59f32bf.tar.gz otp-512ef9d925bc71b6a937e9936e99929cb59f32bf.tar.bz2 otp-512ef9d925bc71b6a937e9936e99929cb59f32bf.zip |
[observer] Fix dead processes
Again sigh
Diffstat (limited to 'lib/observer/src/observer_pro_wx.erl')
-rw-r--r-- | lib/observer/src/observer_pro_wx.erl | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/lib/observer/src/observer_pro_wx.erl b/lib/observer/src/observer_pro_wx.erl index 7578215ff9..e2f3ddb02b 100644 --- a/lib/observer/src/observer_pro_wx.erl +++ b/lib/observer/src/observer_pro_wx.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2011. All Rights Reserved. +%% Copyright Ericsson AB 2011-2012. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -191,13 +191,20 @@ dump_to_file(Parent, FileName, Holder) -> start_procinfo(undefined, _Frame, Opened) -> Opened; start_procinfo(Pid, Frame, Opened) -> - case lists:member(Pid, Opened) of - true -> - Opened; - false -> - observer_procinfo:start(Pid, Frame, self()), - [Pid | Opened] + %% This code doesn't work until we collect which windows have been + %% closed maybe it should moved to observer_wx.erl + %% and add a global menu which remembers windows. + %% case lists:keyfind(Pid, 1, Opened) of + %% false -> + case observer_procinfo:start(Pid, Frame, self()) of + {error, _} -> Opened; + PI -> [{Pid, PI} | Opened] end. + %%; + %% {_, PI} -> + %% wxFrame:raise(PI), + %% Opened + %% end. call(Holder, What) -> Ref = erlang:monitor(process, Holder), |