Thread: Data read and write

  1. #1
    Registered User
    Join Date
    Oct 2012
    Posts
    8

    Data read and write

    Hi All,

    My program needs to receive data continuously from one process and the received data is read continuously by another process.

    I thought using a pipe would be best solution for this, But when I am trying to create a pipe using mknod on fat32 file system in linux , it throws an error saying "mknod: operation not permitted".

    Help me to solve this issue or suggest me is there any other solution to my requirement ?

    Regards,
    Shilpa

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    38,125
    Two thoughts.
    1. You weren't super user when you tried this, and the place you tried to make it requires privilege.
    2. Running Linux on FAT32 is a dumb idea.

    The short answer is to write a short program along the lines of
    Code:
    int main ( ) {
      int result = mknod("path",mode,dev);
      if ( result != 0 ) {
        perror("It didn't work");
      }
      return 0;
    }
    Then post your actual results you get from your console.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Nov 2012
    Posts
    1,393
    Quote Originally Posted by shilpac View Post
    I thought using a pipe would be best solution for this, But when I am trying to create a pipe using mknod on fat32 file system in linux , it throws an error saying "mknod: operation not permitted".
    Can you create a named pipe in the home directory of the user who runs the process? Normally the home directory is on a filesystem that supports named pipes, and normally the current user has permissions to create files there. Normally the home directory is written in the environment variable HOME.

  4. #4
    Registered User
    Join Date
    Oct 2012
    Posts
    8
    Salem,

    Result is "It didn't work: Operation not permitted"

    I had tried with Sudo also. But it didn't help.

    c99tutorial,

    Yup. I can create pipe on /home or /tmp.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. pipe() read(), write() - more then 128Kb of data
    By chihwahli in forum C Programming
    Replies: 3
    Last Post: 11-01-2011, 04:32 AM
  2. Read + Write = ?
    By audinue in forum General Discussions
    Replies: 26
    Last Post: 01-23-2010, 06:14 AM
  3. Replies: 21
    Last Post: 11-03-2007, 02:56 PM
  4. Read size of data array when reading .txt data
    By Taquito in forum C Programming
    Replies: 13
    Last Post: 04-29-2007, 01:52 AM
  5. Write and use data stored in data files...
    By alex6852 in forum C++ Programming
    Replies: 2
    Last Post: 11-01-2001, 01:45 PM

Tags for this Thread