- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to write/read using pipe in C?
Operating System - HP-UX
1752422
Members
5876
Online
108788
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2001 01:23 AM
тАО02-07-2001 01:23 AM
How to write/read using pipe in C?
I am trying to create 2 programs to write and read to/from pipe file in HP-UX 10.20. Does anyone have any source code to share? Thanks.
Where can i find more information about this topic?
Can anyone advise where can i find RealTime Programming manual by HP? I remember seeing this manual a few years ago. This manual shows how to use pipe, share memory, semaphore and etc..
Best regards.
Len
Where can i find more information about this topic?
Can anyone advise where can i find RealTime Programming manual by HP? I remember seeing this manual a few years ago. This manual shows how to use pipe, share memory, semaphore and etc..
Best regards.
Len
- Tags:
- pipe
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2001 01:28 AM
тАО02-07-2001 01:28 AM
Re: How to write/read using pipe in C?
Hi Len,
To write to a pipe using a C program, you need to open the pipe first.
This is done through the popen() call.
FILE *popen(const char *command, const char *type);
The popen() call will start a command and return a FILE descriptor that you may use in subsequent fread and fwrite calls (depending on the pipe r/w type ) like any other file.
Use the pclose() to close the pipe.
Best regards,
Dan
To write to a pipe using a C program, you need to open the pipe first.
This is done through the popen() call.
FILE *popen(const char *command, const char *type);
The popen() call will start a command and return a FILE descriptor that you may use in subsequent fread and fwrite calls (depending on the pipe r/w type ) like any other file.
Use the pclose() to close the pipe.
Best regards,
Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2001 05:29 AM
тАО02-07-2001 05:29 AM
Re: How to write/read using pipe in C?
Hi,
A great book about Unix system programming is
'Advanced Programming in the Unix Environment' by Richard Stevens. It covers all these issues.
(Addison-Wesley Pub Co; ISBN: 0201563177 ; Dimensions (in inches): 2.35 x 9.67 x 7.92 )
Bye,
Rik
A great book about Unix system programming is
'Advanced Programming in the Unix Environment' by Richard Stevens. It covers all these issues.
(Addison-Wesley Pub Co; ISBN: 0201563177 ; Dimensions (in inches): 2.35 x 9.67 x 7.92 )
Bye,
Rik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2001 07:44 AM
тАО02-07-2001 07:44 AM
Re: How to write/read using pipe in C?
Another good book by Stevens that has a section on Pipes is "Unix Network Programming: Volume 2: Interprocess Communications". Have a look at site:
http://www.kohala.com/start
This was Stevens' own website, but is now maintained by one of his co-authors and it contains descriptions of his books and downloadable source examples that accompany them. There'll be some pipe demo code in there.
As far as the realtime manual goes I couldn't find one on HP's usual sites, http://docs.hp.com and http://devresource.hp.com. It is probably worth your trying there in case the name isn't quite as you've written. It is probably worth checking the other Unix vendors' sites too since the various companies often produce similar manuals a lot of which, depending on the topic, is not platform specific.
http://www.kohala.com/start
This was Stevens' own website, but is now maintained by one of his co-authors and it contains descriptions of his books and downloadable source examples that accompany them. There'll be some pipe demo code in there.
As far as the realtime manual goes I couldn't find one on HP's usual sites, http://docs.hp.com and http://devresource.hp.com. It is probably worth your trying there in case the name isn't quite as you've written. It is probably worth checking the other Unix vendors' sites too since the various companies often produce similar manuals a lot of which, depending on the topic, is not platform specific.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP