ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am developing a system tray application ,Which will listen to a port for any incoming connection.
Also there is a menu attached with this system tray application, through which user can perform operations.
I have forked a process which will listen to the socket for connection and then perform operations and in the parent thread I am handling the GUI of system tray by calling gtk_main().
What is happening is at the accept() function the code is getting blocked and now even the parent process is not able to function because of this the menu of system tray hangs.
Plz help.
Regards
Arun Tayal
Last edited by arun.tayal; 09-24-2008 at 09:07 AM.
I am developing a system tray application ,Which will listen to a port for any incoming connection.
Also there is a menu attached with this system tray application, through which user can perform operations.
I have forked a process which will listen to the socket for connection and then perform operations and in the parent thread I am handling the GUI of system tray by calling gtk_main().
What is happening is at the accept() function the code is getting blocked and now even the parent process is not able to function because of this the menu of system tray hangs.
Plz help.
If you wrote this application, and you don't post any of the code for folks to look at, how can we help you?
In this application , there is a system tray with a menu attached with it. When we select Start from menu the function the function Start_Connection get called. Basically this function forks a new process which listens to a socket for connection. In the mean time the parent process is handling the system tray . and any event thrown on system tray is handled by parent process.
Now when the child process is waiting for a connection , the parent process also hangs and the system tray does not pops menu. After the connection gets established everything works fine.
Plz help me how to fix this...
Regards
Arun Tayal
Last edited by arun.tayal; 09-25-2008 at 12:40 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.