Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

rfio_popen(3) [debian man page]

RFIO_POPEN(3)						      Rfio Library Functions						     RFIO_POPEN(3)

NAME
rfio_popen, rfio_pclose - start a process and open a pipe to it SYNOPSIS
#include <sys/types.h> #include "rfio_api.h" FILE *rfio_popen (const char *command, const char *type); int rfio_pclose (FILE *fs); DESCRIPTION
rfio_popen starts a process and opens a pipe to it. command is a pointer to a string specifying the shell command to be executed. type is a mode indicator for the pipe. One of the characters "r" or "w". rfio_pclose waits for the forked process to terminate and returns the exit status of the command. EXAMPLE
int c; FILE *rf; rf = rfio_popen (command, "r"); if (rf == NULL) { rfio_perror ("rfio_popen"); exit (1); } while ((c = rfio_pread (buf, 1, sizeof(buf), rf)) > 0) { ... } c = rfio_pclose (rf); RETURN VALUE
This routine returns NULL if the operation failed or a non-NULL pointer to a FILE structure if the operation was successful. If it fails, serrno variable is set appropriately. ERRORS
ENOMEM Not enough memory. EINVAL The mode provided is invalid. ECONNRESET Connection reset by peer ETIMEDOUT Connection timed out ECONNREFUSED Connection refused EHOSTUNREACH No route to host SENOSHOST Host unknown. SENOSSERV Service unknown. SEUMSG2LONG Command string too long. SECOMERR Communication error. SEE ALSO
rfio_pread(3), rfio_pwrite(3) AUTHOR
LCG Grid Deployment Team LCG
$Date: 2008/09/24 11:25:01 $ RFIO_POPEN(3)

Check Out this Related Man Page

RFIO_FSEEK(3)						      Rfio Library Functions						     RFIO_FSEEK(3)

NAME
rfio_fseek - positions/repositions a file SYNOPSIS
#include <sys/types.h> #include "rfio_api.h" int rfio_fseek (FILE *fp, long offset, int whence); Under Linux, for large files: #define _LARGEFILE64_SOURCE #include <sys/types.h> #include "rfio_api.h" int rfio_fseeko64 (FILE *fp, off64_t offset, int whence); For large files, under other systems: #include <sys/types.h> #include "rfio_api.h" int rfio_fseeko64 (FILE *fp, off64_t offset, int whence); DESCRIPTION
rfio_fseek positions/repositions to offset the file associated with the descriptor fp generated by a previous rfio_fopen. whence indicates how to interpret the offset value: SEEK_SET The offset is set from beginning of file. SEEK_CUR The offset is added to current position. SEEK_END The offset is added to current file size. rfio_fseeko64 can be used with large files and allows to use a 64 bit offset rather than a long. RETURN VALUE
This routine returns 0 if the operation was successful or -1 if the operation failed. In the latter case, serrno is set appropriately. ERRORS
EBADF fp is not a valid descriptor. EINVAL incorrect value for whence. SENOSHOST Host unknown. SENOSSERV Service unknown. SETIMEDOUT Timed out. SEBADVERSION Version ID mismatch. SEINTERNAL Internal error. SECONNDROP Connection closed by remote end. SECOMERR Communication error. SEE ALSO
rfio_fopen(3) AUTHOR
LCG Grid Deployment Team LCG
$Date: 2005/03/31 13:13:02 $ RFIO_FSEEK(3)
Man Page

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grep for NULL in a pipe delimited file

hi, How can I check for a field in a pipe-delimited file having a NULL value in Unix using a grep command or any other command. Please reply (5 Replies)
Discussion started by: sureshg_sampat
5 Replies

2. Linux

rdesktop error

hi, I am trying to connect from a linux box runing centos to a windows server using rdesktop-v1.3.1 but I get this error message: ERROR: recv: Connection reset by peer Broken pipe I have tried searching around for any possible fix for this without any success. Other Linux boxes on... (2 Replies)
Discussion started by: bixca
2 Replies

3. Shell Programming and Scripting

Help me please on my problem

I basically just need to transfer one file from one server to another. So I first have to go to this server and with the user name and pass go to their directory and transfer it to another server with a diff user name and pass and paste it there. I have this. #!/bin/sh... (8 Replies)
Discussion started by: kdyzsa
8 Replies

4. UNIX for Dummies Questions & Answers

fatal: Read from socket failed: Connection reset by peer

I get this error when I log in through console: "fatal: Read from socket failed: Connection reset by peer". Can you tell me what this is and why it happens, and how to stop it? Thank you. (1 Reply)
Discussion started by: iamnew2solaris
1 Replies

5. IP Networking

nc (netcat): Connection refused problem

From my machine (ubuntu), I can do $ nc somemachine 80 But, when I want to connect to other machine that runs nc on different ports, it throws "Connection refused" error. The same error occurs on my local machine. For example, nc -l 5555 nc x.x.x.x 5555 --> this throws "Connection... (2 Replies)
Discussion started by: dinga
2 Replies