Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: conserver: users

[PATCH] console in pty spams conserver when parent process exits

 

 

conserver users RSS feed   Index | Next | Previous | View Threaded


eswierk at arastra

Oct 25, 2007, 1:20 PM

Post #1 of 1 (1127 views)
Permalink
[PATCH] console in pty spams conserver when parent process exits

The attached patch fixes a bug in conserver 8.1.16 causing console to
send garbage to the server if read(stdin) returns -1.

This occurs if you run console in a pty on Linux: when the parent
process exits, the kernel eventually SIGHUPs the child, but if the
child keeps reading stdin before this happens, it eventually gets an
EIO, which causes read() to return -1. console currently interprets
this as a valid length and passes -1 to FileWrite(), which ends up
sending a large blob of junk (up to the first NULL) to the server.
This occurs repeatedly until console finally receives SIGHUP.

--Ed
Attachments: conserver-read-stdin-error.patch (0.44 KB)

conserver users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.