![]() |
| | #1 |
| Deprecated Join Date: Oct 2004 Location: Canada
Posts: 944
| Seriously Weird Does anybody have the slightest idea what could be happening here? The process id for sh seems to change too.. 5365/sh, 4192/sh, 1736/sh. Then, out of the blue, it starts showing them back under my program name. It goes back and forth every 3-10 minutes. I feel this may also be causing a bug where all of my sockets suddenly go invalid. What the heck? Any information greatly appreciated!
__________________ Warning: Have doubt in anything I post. GCC 4.5.0 (lambda branch), Boost 1.40.0, Code::Blocks 8.02, Ubuntu 9.04 010001000110000101100101 |
| Dae is offline | |
| | #2 |
| subminimalist Join Date: Jul 2008 Location: NYC
Posts: 3,944
| You do know that sh is bash/the shell? Not that that totally explains this, but it makes it somewhat less strange.
__________________ Accuracy and integrity mean nothing if you don't make it past the censors...PYTHAGORAS |
| MK27 is offline | |
| | #3 | |
| Deprecated Join Date: Oct 2004 Location: Canada
Posts: 944
| Quote:
So somehow my application is switching it's parenthood of the file descriptors to the shell I'm running the application under? I wonder if this could be a socket.cancel() bug.. ran into it on Windows but Asio had a macro fix. I'll keep tweaking and looking around.
__________________ Warning: Have doubt in anything I post. GCC 4.5.0 (lambda branch), Boost 1.40.0, Code::Blocks 8.02, Ubuntu 9.04 010001000110000101100101 | |
| Dae is offline | |
| | #4 |
| Registered User Join Date: Oct 2007
Posts: 22
| May be your program from time to time use system() function ? |
| Valery Reznic is offline | |
| | #5 |
| Senior software engineer Join Date: Mar 2007 Location: Portland, OR
Posts: 5,381
| That's my guess as well. All open file descriptors get propagated to any child process. A call to system() would definitely show up as "sh" in the process list.
__________________ "Congratulations on your purchase. To begin using your quantum computer, set the power switch to both off and on simultaneously." -- raftpeople@slashdot |
| brewbuck is offline | |
| | #6 |
| Deprecated Join Date: Oct 2004 Location: Canada
Posts: 944
| A little too late but that was it guys. I didn't know that's how it worked, thanks. ![]() I was opening netstat with popen() from within my application. Is there any way to avoid that from happening? I'd like to get a count of how many real connections my application is using (monitor). It might have been doing that because of canceling sockets, it appears unreliable in Asio - I'm not always getting my callbacks, which means the sockets don't always get closed. That might cause the sockets to appear under a different process. Might be something else. I'm gonna try a different solution - pass my callbacks to a deadline timer.
__________________ Warning: Have doubt in anything I post. GCC 4.5.0 (lambda branch), Boost 1.40.0, Code::Blocks 8.02, Ubuntu 9.04 010001000110000101100101 |
| Dae is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| weird things with my linked list of queue | -EquinoX- | C Programming | 3 | 11-22-2008 11:23 PM |
| weird | kiz | C Programming | 8 | 09-24-2007 01:16 AM |
| Weird Characters With GetDlgItemText | execute | Windows Programming | 4 | 05-04-2006 04:53 PM |
| weird error | gandalf_bar | Linux Programming | 2 | 07-17-2005 07:32 AM |
| Getting weird characters in Strings | steve8820 | C Programming | 3 | 09-18-2001 02:49 AM |