Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes Exception when infected process closes #1

Merged
merged 2 commits into from Mar 15, 2012
Merged

Conversation

jlew
Copy link
Contributor

@jlew jlew commented Mar 15, 2012

How to reproduce this bug.

In one terminal start a python process
Open pyrasite-gui
Infect that process
Close the terminal (or kill the python process)

Result: Exception to console, update thread crashes an no longer updates any processes.

This update will catch the exception and then add [Terminated] to the
process title in the info_view
for open_file in self.process.get_open_files():
files.append(open_file.path)
open_files = files
time.sleep(1)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this sleep necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It goes into a tight loop otherwise. Alternatively we can kill the thread
and start a new one when the user selects a new process

-Jlew

Sent from android
On Mar 15, 2012 1:28 PM, "Luke Macken" <
reply@reply.github.com>
wrote:

             else:
  •                rip, rport = conn.remote_address
    
  •            connections.append({
    
  •                'type': type,
    
  •                'status': conn.status,
    
  •                'local': '%s:%s' % (lip, lport),
    
  •                'remote': '%s:%s' % (rip, rport),
    
  •                })
    

- open_connections = connections

  •        # Open files
    
  •        files = []
    
  •        for open_file in self.process.get_open_files():
    
  •            files.append(open_file.path)
    
  •        open_files = files
    
  •                time.sleep(1)
    

Is this sleep necessary?


Reply to this email directly or view it on GitHub:
https://github.com/lmacken/pyrasite-gui/pull/1/files#r564215

lmacken added a commit that referenced this pull request Mar 15, 2012
Fixes Exception when infected process closes
@lmacken lmacken merged commit 072502c into lmacken:master Mar 15, 2012
@lmacken
Copy link
Owner

lmacken commented Mar 15, 2012

Looks good to me, thanks jlew!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants