The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
pipe output to script as command line argument IMTheNachoMan UNIX for Dummies Questions & Answers 3 04-26-2008 12:59 PM
how to pipe output of here-document!! sami98 Shell Programming and Scripting 7 02-17-2008 10:40 AM
grep string and output filename happyv Shell Programming and Scripting 3 11-20-2007 12:16 AM
read file and output message happyv Shell Programming and Scripting 12 01-24-2007 09:57 PM
Output the message ust UNIX for Dummies Questions & Answers 1 09-25-2005 08:35 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-17-2006
princelinux princelinux is offline
Registered User
  
 

Join Date: Apr 2006
Posts: 32
output string message to pipe

i am new to linux programming. can anyone answer my question?

there is one pipe file "my_pipe"
prw-r--r-- 1 john rnd 32 Aug 17 19:45 my_pipe

how to output string message (char*) to this pipe? which API should I use?
  #2 (permalink)  
Old 08-17-2006
apoorvasharma80 apoorvasharma80 is offline
Registered User
  
 

Join Date: Aug 2006
Posts: 69
If you have opened the pipe via pipe system cmd then you must have access to 2 file descriptors which are read and write ends for pipe. You can write on the write end of pipe using the 'write' system call.

A better help would be Beej's guide for IPC.

regards
Apoorva Kumar
  #3 (permalink)  
Old 08-17-2006
princelinux princelinux is offline
Registered User
  
 

Join Date: Apr 2006
Posts: 32
thanks, will try it.
  #4 (permalink)  
Old 08-18-2006
Hitori's Avatar
Hitori Hitori is offline Forum Advisor  
Registered User
  
 

Join Date: Jun 2006
Posts: 360
If you already have a fifo file you don't have to do special things to write/read to/from this file. From the point of view of the process it is the ordinary file with write/read capabilities. If you want IPC you can at first create a pipe "in the memory" and use 2 descriptors to read/write.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:52 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0