Sponsored Content
Full Discussion: Non-blocking pipe
Top Forums Shell Programming and Scripting Non-blocking pipe Post 302285834 by Corona688 on Monday 9th of February 2009 07:55:08 PM
Old 02-09-2009
A UNIX domain socket is essentially a FIFO with the extra properties you want -- the ability for multiple clients to connect to one server. See this link for details.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

blocking domains

Dear All , Kindly note I have sun solaries 7 . I want to block a domain who keep sending emails to my domain and users . thanks (1 Reply)
Discussion started by: tamemi
1 Replies

2. IP Networking

School Blocking

I'm in highschool. They blocked my favorite site. How do I disable websense without getting caught on that particular webpage? Is it even possible? *twitch* I would also like to get as much UNIX for beginners information, so if someone might point me in the right direction so I don't have to read... (1 Reply)
Discussion started by: Satine
1 Replies

3. IP Networking

blocking DHCP

I've got a legit DHCP server on my network. I've got a 3550 as my VTP server providing 4 vlans to 4 2950 switches. If somebody were to plug into one of those vlans with a DHCP server configured then it would throw off my whole network. How could i block the DHCP server that could plug into the... (2 Replies)
Discussion started by: byblyk
2 Replies

4. Shell Programming and Scripting

Reading from blocking fifo pipe in shell script

Hi!! I have a problem reading from a fifo pipe in shell script. The idea is simple, I have a C program with two pipe files: An input pipe I use to send commands in shell script to the C program (echo "command" > input.pipe) An output pipe that I read the result of the command also in... (4 Replies)
Discussion started by: victorin
4 Replies

5. UNIX for Advanced & Expert Users

ps blocking

Hi Folks I have been debugging a script that is called every thirty seconds. Basically it is doing a ps, well two actually, one to file (read by the getline below) and the other into a pipe. The one into the pipe is: - V_SYSVPS=/usr/sysv/bin/ps $V_SYSVPS -p$PIDLIST -o$PSARGS... (0 Replies)
Discussion started by: steadyonabix
0 Replies

6. UNIX for Dummies Questions & Answers

Blocking signals

I know how to add signal to a set. But what if I want to add 2 or 3 signals to the set. I know I can use sigaddset (&set,SIGBUS)....but what if I want to add SIGBUS and SIGALRM at once. Do i have to do it like this.. sigaddset (&set,SIGBUS); sigaddset (&set,SIGALRM); Is there another way to... (0 Replies)
Discussion started by: joker40
0 Replies

7. Shell Programming and Scripting

Replace pipe with Broken Pipe

Hi All , Is there any way to replace the pipe ( | ) with the broken pipe (0xA6) in unix (1 Reply)
Discussion started by: saj
1 Replies

8. IP Networking

ping blocking

Hi I am starting to practice nmap for my own education. Now I created two host in virtual box. Bot are scientific linux, one in installed as web server and the other as developing station. I tried to run nmap on so I did nmap on their IP address, I got an answer that ip is down or that... (8 Replies)
Discussion started by: programAngel
8 Replies

9. Shell Programming and Scripting

How to ignore Pipe in Pipe delimited file?

Hi guys, I need to know how i can ignore Pipe '|' if Pipe is coming as a column in Pipe delimited file for eg: file 1: xx|yy|"xyz|zzz"|zzz|12... using below awk command awk 'BEGIN {FS=OFS="|" } print $3 i would get xyz But i want as : xyz|zzz to consider as whole column... (13 Replies)
Discussion started by: rohit_shinez
13 Replies

10. Programming

Which are blocking and non-blocking api's in sockets in C ?

among the below socket programming api's, please let me know which are blocking and non-blocking. socket accept bind listen write read close (2 Replies)
Discussion started by: VSSajjan
2 Replies
PIPE(2) 						      BSD System Calls Manual							   PIPE(2)

NAME
pipe, pipe2 -- create descriptor pair for interprocess communication LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <unistd.h> int pipe(int fildes[2]); int pipe2(int fildes[2], int flags); DESCRIPTION
The pipe() system call creates a pipe, which is an object allowing bidirectional data flow, and allocates a pair of file descriptors. The pipe2() system call allows control over the attributes of the file descriptors via the flags argument. Values for flags are constructed by a bitwise-inclusive OR of flags from the following list, defined in <fcntl.h>: O_CLOEXEC Set the close-on-exec flag for the new file descriptors. O_NONBLOCK Set the non-blocking flag for the ends of the pipe. If the flags argument is 0, the behavior is identical to a call to pipe(). By convention, the first descriptor is normally used as the read end of the pipe, and the second is normally the write end, so that data written to fildes[1] appears on (i.e., can be read from) fildes[0]. This allows the output of one program to be sent to another program: the source's standard output is set up to be the write end of the pipe, and the sink's standard input is set up to be the read end of the pipe. The pipe itself persists until all its associated descriptors are closed. A pipe that has had an end closed is considered widowed. Writing on such a pipe causes the writing process to receive a SIGPIPE signal. Widowing a pipe is the only way to deliver end-of-file to a reader: after the reader consumes any buffered data, reading a widowed pipe returns a zero count. The bidirectional nature of this implementation of pipes is not portable to older systems, so it is recommended to use the convention for using the endpoints in the traditional manner when using a pipe in one direction. RETURN VALUES
The pipe() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error. ERRORS
The pipe() and pipe2() system calls will fail if: [EMFILE] Too many descriptors are active. [ENFILE] The system file table is full. [ENOMEM] Not enough kernel memory to establish a pipe. The pipe2() system call will also fail if: [EINVAL] The flags argument is invalid. SEE ALSO
sh(1), fork(2), read(2), socketpair(2), write(2) HISTORY
The pipe() function appeared in Version 3 AT&T UNIX. Bidirectional pipes were first used on AT&T System V Release 4 UNIX. The pipe2() function appeared in FreeBSD 10.0. BSD
May 1, 2013 BSD
All times are GMT -4. The time now is 12:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy