473,413 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

reading from pipe

Hi,

I have a program that reads from a named pipe. If there is nothing to
read the program is waiting but I would like the program to proceed when
there is nothing to read. How can I do that?
I would be appreciative for any help.

Regards

Rolf Wester

Nov 13 '05 #1
2 4643
Greetings.

In article <bm**********@nets3.rz.RWTH-Aachen.DE>, Rolf Wester wrote:
I have a program that reads from a named pipe. If there is nothing to
read the program is waiting but I would like the program to proceed when
there is nothing to read. How can I do that?
I would be appreciative for any help.


Try asking on comp.unix.programmer. Pipes aren't a feature of standard C.

Regards,
Tristan

--
_
_V.-o Tristan Miller [en,(fr,de,ia)] >< Space is limited
/ |`-' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= <> In a haiku, so it's hard
(7_\\ http://www.nothingisreal.com/ >< To finish what you
Nov 13 '05 #2
Tristan Miller wrote:
Greetings.

In article <bm**********@nets3.rz.RWTH-Aachen.DE>, Rolf Wester wrote:
I have a program that reads from a named pipe. If there is nothing to
read the program is waiting but I would like the program to proceed when
there is nothing to read. How can I do that?
I would be appreciative for any help.

Try asking on comp.unix.programmer. Pipes aren't a feature of standard C.

Regards,
Tristan

Thanks for that hint. It helped.

Regards

Rolf Wester

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Bernhard Kuemel | last post by:
Hi! I want to read/write commands and program input to/from /bin/bash several times before I close the stdin pipe. However, reading from cat hangs unless I first close the stdin pipe. <?php...
5
by: Jeroen van der Ham | last post by:
Hello, During my exploration of Python and rewriting something from Perl to Python I ran into something odd. I want to use a pipe so that a log of a program goes into a Python script instead of...
2
by: MrEntropy | last post by:
Greetings, I'm having a little trouble getting an idea running. I am writing a C program which is really a frontend to a Python program. Now, my C program starts up, does some initialisation like...
3
by: lpe540 | last post by:
Hi, I'm having trouble using istream to read in a file in its entirety on UNIX. I've written a dummy program that essencially reads in a file from stdin and writes it out to a file. When I cat a...
1
by: inkapyrite | last post by:
Hi all. I'm using ifstream to read from a named pipe but i've encountered an annoying problem. For some reason, the program blocks on reading an ifstream's internal buffer that's only half-filled....
6
by: chad kline | last post by:
FBSD 4.8/GCC //////// C-CODE: //////// char c; while ( 1 ) {
4
by: bill | last post by:
I am confused by the behavior of the following code. The function copy() takes two FILE *'s and copies the data from one to the other. In the main routine, I create a pipe and copy stdin to the...
2
by: Kyle0654 | last post by:
I've been searching for a solution to this problem for a while but haven't hit upon anything yet. Details: Using: MSVC++ .NET 2003 App type: Windows Forms Application (Managed C++)...
0
by: Leon zhang | last post by:
#!/usr/bin/env python # -*- coding: utf-8 -*- import string, sys from threading import Thread import os import time class test_pipe(Thread): def __init__(self, fd):
0
by: Jean-Paul Calderone | last post by:
On Sun, 1 Jun 2008 07:32:39 -0700 (PDT), Leon zhang <leoncamel@gmail.comwrote: file.read() reads the entire contents of the file. Your code never closes the write end of the pipe, so the read...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.