2

im going crazy trying to look for examples of unix domain socket usage on bash. I'm starting to think if it is possible at all, and thenI find people using them for netowrk stuff, i wanting merely for IPC locally, can someone facilitate me some example, resources, guidance or at least if its possible at all?

Is this so deep in the kernel that it can only be programmed C for example... I;ve seen some Python stuff i think tho...

Thanks.

maco1717
  • 823
  • 10
  • 26
  • 3
    If you just want local IPC, a named pipe should work as well, and is easier to create (`mknod` or `mkfifo`) and use (treat it like a file) from the command line – chepner Apr 22 '14 at 15:19
  • yeah! i've used them but they halt my code till something is send. Is there a way to not to make the command halt i've been recomended to use read -t i think but i need to register the "event" i was thinking maybe socket would allow me more asynchronousness would you know? - THanks a lot! – maco1717 Apr 22 '14 at 15:42
  • If you must use unix domain sockets, you may be able to use the [netcat](http://en.wikipedia.org/wiki/Netcat) or [socat](http://www.dest-unreach.org/socat/doc/socat.html#ADDRESS_UNIX_CONNECT) utilities if either is available to you. – Digital Trauma Apr 22 '14 at 17:23
  • Even for local sockets? non-network? interesting... Ive decided to not must use sockets in the end, thanks anyway. :D – maco1717 Apr 23 '14 at 17:29

1 Answers1

0

I've decided to go off using bash, it would be a big big task and i dont have any real constrains, I have learn a lot of how linux works tho, in essence to be able to implement this would have to probaly modify some parts of the kernel...

Thanks everyone.

maco1717
  • 823
  • 10
  • 26