LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-07-2010, 03:09 PM   #1
golmschenk
Member
 
Registered: Nov 2009
Posts: 144

Rep: Reputation: 15
C - Resource temporarily unavailable


I'm working a program to implement a simple multi-process browser. The browser works by having a ROUTER process as the parent of everything else in the program. There's another process called the CONTROLLER which is part of where the user can input information. To tell the ROUTER to make a new tab in the browser the user activates a function from the CONTROLLER to send the create new tab information to the ROUTER:
Code:
void new_tab_created_cb(GtkButton *button, gpointer data)
{
    if(!data)
      return;
   int tab_index = ((browser_window*)data)->tab_index;  
   comm_channel channel = ((browser_window*)data)->channel;

    // Create a new request of type CREATE_TAB

   child_req_to_parent new_req;

   new_req.type = CREATE_TAB;
   new_req.req.new_tab_req.tab_index = tab_index;
   if (write(channel.child_to_parent_fd[1],(char*)&new_req,sizeof(child_req_to_parent)) == -1);
   {
      perror("Error:Couldn't write new_tab_created to Router from Controller!");
   }
}
When run the error at the end of this code is hit with:
Code:
Error:Couldn't write new_tab_created to Router from Controller!: Resource temporarily unavailable
What's the resource unavailable error coming from and how can it be fix? Thanks!
 
Old 03-07-2010, 03:28 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

I believe that the error might be occurring somewhere in GTK+, not C, and perhaps not even your "write()" per se. Here's an example:

http://groups.google.com/group/linux...2dfc0040943fa1

I noticed your other posting about trying to multicast 1::many messages with Linux pipes. I still don't know whether or not it's possible (and, if possible, under exactly what platforms/what circumstances). But as long as you're already using GTK+, and since you're clearly using interprocess communication, I STRONGLY urge you to look at "DBus":

http://dbus.freedesktop.org/doc/dbus-tutorial.html

http://www.ibm.com/developerworks/li...ry/l-dbus.html

'Hope that helps .. PSM
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Resource temporarily unavailable hostmaster Linux - Enterprise 2 02-14-2010 04:41 AM
Resource temporarily unavailable manoj.linux Linux - Enterprise 3 11-06-2009 08:21 AM
vfork: resource temporarily unavailable verbose Linux - General 5 02-04-2007 04:17 AM
xcdroast - resource temporarily unavailable mwildam Linux - Newbie 4 09-24-2006 04:28 PM
SIOCSIFFLAGS: Resource temporarily unavailable bleef Linux - Networking 2 05-14-2001 10:54 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration