pipestatus 0.5.0 (Default branch)


 
Thread Tools Search this Thread
Special Forums News, Links, Events and Announcements Software Releases - RSS News pipestatus 0.5.0 (Default branch)
# 1  
Old 05-23-2008
pipestatus 0.5.0 (Default branch)

pipestatus is a source file for UNIX/POSIX shellsthat provides set of functions for obtaining theexit status of every program in a pipe withoutusing non-portable extensions. Most shells, suchas BSD /bin/sh, ksh, pdksh, ash, bash, dash, mksh,and zsh are supported.License: Public DomainChanges:
"check_status_re" and therefore "runpipe_re" use"grep -E" instead of "grep" in order to simplifythe regexp that contains exit statuses of 2 ormore digits. Formally speaking, this breaksbackward compatibility. If the PIPESTATUS_VERBOSEvariable is set to a non-empty string, then thecheck_status0 and check_status_re functions printan error message to stderr.Image

More...
Login or Register to Ask a Question

Previous Thread | Next Thread

2 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash ${PIPESTATUS[@]}

I'm using this form of variable setting to use the exit status of a pipeline e.g. foo=$(date|grep -i thursday)$? echo $foo echo ${PIPESTATUS} or $foo later in a script. On days other than Thursday it results in: 1 0 For some reason the PIPESTATUS array doesn't show. I'd... (2 Replies)
Discussion started by: spacegoose
2 Replies

2. Shell Programming and Scripting

Creating a run script, getting pipestatus from eval

Hi All, I'm new to bash so I appreciate any help. Basically I want to create a script that takes 1 argument, a string from the command line. It then executes that string emailing me the std out and std err. And lastly it checks the exit status of the job and sends me an email telling me if the... (7 Replies)
Discussion started by: markov49
7 Replies
Login or Register to Ask a Question
pipe(2) 							System Calls Manual							   pipe(2)

Name
       pipe - create an interprocess channel

Syntax
       include <limits.h> /*Definition of PIPE_MAX*/
       pipe(fildes)
       int fildes[2];

Arguments
       fildes	 Passing an address as an array of two integers into the system call.

Description
       The system call creates an I/O mechanism called a pipe.	The file descriptors returned can be used in and operations.  Their integer values
       will be the two lowest available at the time of the function call.  The O_NONBLOCK and FD_CLOEXEC flags will be clear on both file descrip-
       tors.

       When the pipe is written using the descriptor fildes[1], up to PIPE_MAX bytes of data are buffered before the writing process is suspended.
       A read using the descriptor fildes[0] picks up the data.

       It is assumed that after the pipe has been set up, two (or more) cooperating processes (created by subsequent calls) pass data through  the
       pipe with and calls.

       The shell has a syntax to set up a linear array of processes connected by pipes.

       For further information on how and calls behave with pipes, see the and reference pages.

       A signal is generated if a write on a pipe with only one end is attempted.

Restrictions
       Should more than 4096 bytes be necessary in any pipe among a loop of processes, deadlock may occur.

       The  underlying	implementation	of  pipes is no longer socket based, but rather implemented through the file system.  Any application that
       needs socket functionality from pipes should use the system call.

Return Values
       The function value zero is returned if the pipe was created; -1 if an error occurred.

Diagnostics
       The call fails if:

       [EMFILE]       Too many descriptors are active.

       [ENFILE]       The system file table is full.

       [EFAULT]       The fildes buffer is in an invalid area of the process's address space.

Environment
       Differs from the System V definition in that ENFILE is not a possible error condition.

See Also
       sh(1), fork(2), read(2), socketpair(2), write(2)

																	   pipe(2)