Thread: configure kernel for "IPC Namespace"

  1. #1
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300

    configure kernel for "IPC Namespace"

    Does anyone know anything about the significance of the CONFIG_IPC_NS for using local sockets? It's a "when in doubt, say no" question (I said no) but I do have CONFIG_SYSVIPC set and CONFIG_SYSVIPC_SYSCTL, altho I don't think there's any option for the later in menuconfig et. al. I would have thought CONFIG_UNIX was all that's necessary for local sockets to work right.

    I'm wondering because after thousands of successful connections, I'm having a wierd problem with accept():

    Code:
    struct sockaddr other;
    socklen_t size;
    int SD=accept(remote,&other,&size);
    Causes accept to return errno 29 "Invalid argument" -- which I can't find any documentation about what this might mean, if it's anything different than errno 22: EINVAL.

    However I did find this note on the web:
    "This seems to be a recurring theme with redhat 7.x, there are numerous posts about this but as far we havent found a solution. Might i suggest a Kernel upgrade?"

    I am running a newer kernel and have a hard time believing this is the problem as X, etc. use local sockets too. Even stranger is that in the current situation, this is what made the difference with accept:

    Code:
    struct sockaddr other, *ptr=&other;
    socklen_t size;
    int SD=accept(remote,ptr,&size);
    I tried this numerous times both ways and don't understand why the 2nd version is "acceptable" whereas the first one (which is normative and always worked for me before) is not. Unfortunely, the connection returned then does not work properly...

    Anyway, since the listening socket is PF_LOCAL, this "sockaddr" makes use of the "local namespace" which may or may not be "IPC Namespace".

    I may try and recompile but I doubt this is the issue, somehow. Any thoughts or suggestions are, as usual, much appreciated.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  2. #2
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by MK27 View Post

    I may try and recompile but I doubt this is the issue, somehow. Any thoughts or suggestions are, as usual, much appreciated.
    Suprise! It wasn't.

    Once again, I got myself sorted out by RobSeace at "developerweb".

    This was more of a gtk/multithreading problem.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Kernel bug? (attn matsp)
    By brewbuck in forum Linux Programming
    Replies: 7
    Last Post: 04-13-2009, 10:31 AM
  2. SOS - Can a monolithic kernel be used in a micro-kernel style OS?
    By sean in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 11-20-2008, 09:30 AM
  3. Programming RIP2 with kernel routes table
    By jpablo in forum Linux Programming
    Replies: 1
    Last Post: 04-22-2006, 11:26 AM
  4. CreateThread ?!
    By Devil Panther in forum Windows Programming
    Replies: 13
    Last Post: 11-15-2005, 10:55 AM
  5. Linux kernel not compiling
    By frenchfry164 in forum Tech Board
    Replies: 2
    Last Post: 04-29-2003, 04:10 PM