Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 438573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T20:41:30+00:00 2026-05-12T20:41:30+00:00

What is the reliable way of implementing bidirectional communication to a Linux process? I

  • 0

What is the reliable way of implementing bidirectional communication to a Linux process?

I see that popen does not seem to support “r” and “w” access at the same time… or at least that’s what is implied:

The type argument is a pointer to a null-terminated string which must be either 'r' for reading or 'w' for writing.

(I am so missing Erlang at the moment)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T20:41:31+00:00Added an answer on May 12, 2026 at 8:41 pm

    Unix domain sockets are your friend.

    A Unix domain socket or IPC socket
    (inter-process communication socket)
    is a data communications endpoint that
    is similar to an Internet socket, but
    does not use a network protocol for
    communication. It is used in POSIX
    operating systems for inter-process
    communication.

    You reserve a name for your communications channel, such as /myapp/ipc, and then both processes open that address using a UNIX socket:

    struct sockaddr_un local;
    int len;
    
    s = socket(AF_UNIX, SOCK_STREAM, 0);
    local.sun_family = AF_UNIX;
    strcpy(local.sun_path, "/myapp/ipc");
    len = strlen(local.sun_path) + sizeof(local.sun_family);
    bind(s, (struct sockaddr *)&local, len);
    

    Now you can use listen or connect or whatever else in the socket family. It’s a little bit of work, but is the best way to achieve IPC on Linux.

    Since Erlang is just a nice language for specifying little servers (processes) that communicate over named pipes (processes), this model should feel comfortable to you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a reliable way of detecting what version of Java is installed on
I'm trying to find if there is a reliable way (using SQLite ) to
I'm wondering what is the quickest and most reliable way to forward mail from
I need to queue events and tasks for external systems in a reliable/transactional way.
What is the most reliable and secure way to determine what page either sent,
A reliable coder friend told me that Python's current multi-threading implementation is seriously buggy
Possible Duplicate: Reliable way of generating unique hardware ID Am trying to generate an
I need reliable way to run 10 different tasks simultaneously. For instance the first
What is a safe and reliable way to select the link below? I am
Is there a pure .net way to do this reliably? The solutions I keep

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.