02-26-2007
A named pipe is used for 2 processes to communicate with each other.
One process writes to the pipe where the other reads from the pipe.
What are you trying to accomplish anyway?
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi All,
I am facing a vague issue while trying to make two process talk to each
other using named pipe.
read process
=========
The process which reads, basically creates FIFO using
mkfifo - ret_val = mkfifo(HALF_DUPLEX, 0666);) func.
It then opens the pipe using open func - fd =... (1 Reply)
Discussion started by: sharanbr
1 Replies
2. Programming
Hi All,
I am facing a vague issue while trying to make two process talk to each
other using named pipe.
read process
=========
The process which reads, basically creates FIFO using
mkfifo - ret_val = mkfifo(HALF_DUPLEX, 0666) func.
It then opens the pipe using open func - fd = open... (2 Replies)
Discussion started by: sharanbr
2 Replies
3. UNIX for Dummies Questions & Answers
Gurus,
I've a File Transaction Server, which communicates with other servers and performs some processing.It uses many Named PIPE's.
By mistake i copied a named PIPE into a text file.
I heard that PIPE files shouldn't be copied.Isn't it?
Since it's a production box, i'm afraid on... (2 Replies)
Discussion started by: Tamil
2 Replies
4. UNIX for Dummies Questions & Answers
Can someone explain to me the working of fifo() system call using simple C programs so that I can implement them in the UNIX environement? (1 Reply)
Discussion started by: lvkchaitanya
1 Replies
5. Shell Programming and Scripting
I would like to pipe (redirect ? - what is the right term?) the output of my script to a file named with the current date.
If I run this at a command prompt:
date +'%Y%m%d"
...it returns "20110429"
OK, that's good... so I try:
./script.sh > "'date +%Y%m%d'.csv"
I get a file... (1 Reply)
Discussion started by: landog
1 Replies
6. Shell Programming and Scripting
Hi,
I am getting data into a Named pipe. Does Named pipe have any size restriction; I know it does not have any storage and it just passes on the data to the next process.
I want to know, if there will be a difference in the Named pipe performance if the data input is more. (I am using DB2... (1 Reply)
Discussion started by: sudvishw
1 Replies
7. Programming
Hi All !
I try to collect importent events from syslog and in my
syslog conf, there is something like this:
*.* |/logs/ipes/SLpipe1
I have a program, which opens this pipe and reads the messages from it.
But how this pipe works ? Where can I probably read something about the details,... (3 Replies)
Discussion started by: mabra
3 Replies
8. Shell Programming and Scripting
I have a ksh93 script I use that processes a file list in the order that they exist in the list. I would like to speed up processing of the list by having multiple processes handle it at once. I was thinking that perhaps a good way to handle this would be to write the list to a named pipe and some... (4 Replies)
Discussion started by: benalt
4 Replies
9. UNIX for Dummies Questions & Answers
Ok, I can't seem to figure this out or find anything on the web about this.
I'm on Sun Solaris, UNIX.
I have the following test script:
#!/bin/ksh
touch test.file
LOG=./tmp.log
rm -f ${LOG}
PIPE=./tmp.pipe
mkfifo ${PIPE}
trap "rm -f ${PIPE}" EXIT
tee -a ${LOG} < ${PIPE} &
... (17 Replies)
Discussion started by: Ditto
17 Replies
10. Shell Programming and Scripting
Hi ALL,
How can I test a given file name exists and if it is a named pipe file in shell script ?
Thanks............ (2 Replies)
Discussion started by: mycode.in
2 Replies
LEARN ABOUT SUNOS
usb_pipe_get_state
usb_pipe_get_state(9F) Kernel Functions for Drivers usb_pipe_get_state(9F)
NAME
usb_pipe_get_state - Return USB pipe state
SYNOPSIS
#include <sys/usb/usba.h>
int usb_pipe_get_state(usb_pipe_handle_t pipe_handle, usb_pipe_state_t *pipe_state, usb_flags_t usb_flags);
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI)
PARAMETERS
pipe_handle
Handle of the pipe to retrieve the state.
pipe_state
Pointer to where pipe state is returned.
usb_flags
No flags are recognized. Reserved for future expansion.
DESCRIPTION
The usb_pipe_get_state() function retrieves the state of the pipe referred to by pipe_handle into the location pointed to by pipe_state.
Possible pipe states are:
USB_PIPE_STATE_CLOSED
Pipe is closed.
USB_PIPE_STATE_ACTIVE
Pipe is active and can send/receive data. Polling is active for isochronous and interrupt pipes.
USB_PIPE_STATE_IDLE
Polling is stopped for isochronous and interrupt-IN pipes.
USB_PIPE_STATE_ERROR
An error occurred. Client must call usb_pipe_reset(). Note that this status is not seen by a client driver if USB_ATTRS_AUTOCLEARING is
set in the request attributes.
USB_PIPE_STATE_CLOSING
Pipe is being closed. Requests are being drained from the pipe and other cleanup is in progress.
RETURN VALUES
USB_SUCCESS Pipe state returned in second argument.
USB_INVALID_ARGS Pipe_state argument is NULL.
USB_INVALID_PIPE Pipe_handle argument is NULL.
CONTEXT
May be called from user, kernel or interrupt context.
EXAMPLES
usb_pipe_handle_t pipe;
usb_pipe_state_t state;
/* Recover if the pipe is in an error state. */
if ((usb_pipe_get_state(pipe, &state, 0) == USB_SUCCESS) &&
(state == USB_PIPE_STATE_ERROR)) {
cmn_err (CE_WARN, "%s%d: USB Pipe error.",
ddi_driver_name(dip), ddi_get_instance(dip));
do_recovery();
}
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Architecture |PCI-based systems |
+-----------------------------+-----------------------------+
|Interface stability |Evolving |
+-----------------------------+-----------------------------+
|Availability |SUNWusb |
+-----------------------------+-----------------------------+
SEE ALSO
attributes(5), usb_clr_feature(9F), usb_get_cfg(9F). usb_get_status(9F), usb_pipe_close(9F), usb_pipe_ctrl_xfer(9F), usb_pipe_open(9F).
usb_pipe_reset(9F)
SunOS 5.10 5 Jan 2004 usb_pipe_get_state(9F)