rfio_popen man page

RFIO_POPEN(3) Rfio Library Functions RFIO_POPEN(3)

rfio_popen, rfio_pclose - start a process and open a pipe to it

[1m#include <sys/types.h>[0m
[1m#include "rfio_api.h"[0m

[1mFILE *rfio_popen (const char *[4m[22mcommand[24m[1m, const char *[4m[22mtype[24m[1m);[0m

[1mint rfio_pclose (FILE *[4m[22mfs[24m[1m);[0m

[1mrfio_popen [22mstarts a process and opens a pipe to it.

[4mcommand[24m is a pointer to a string specifying the shell command to be

[4mtype[24m is a mode indicator for the pipe. One of the characters "r" or

[1mrfio_pclose [22mwaits for the forked process to terminate and returns the
exit status of the command.

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);

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, [1mser-[0m
[1mrno [22mvariable is set appropriately.

[1mENOMEM [22mNot enough memory.

[1mEINVAL [22mThe mode provided is invalid.

[1mECONNRESET [22mConnection reset by peer

[1mETIMEDOUT [22mConnection timed out

[1mECONNREFUSED [22mConnection refused

[1mEHOSTUNREACH [22mNo route to host

[1mSENOSHOST [22mHost unknown.

[1mSENOSSERV [22mService unknown.

[1mSEUMSG2LONG [22mCommand string too long.

[1mSECOMERR [22mCommunication error.

[1mSEE ALSO[0m
[1mrfio_pread(3)[22m, [1mrfio_pwrite(3)[0m

[1mLCG Grid Deployment [22mTeam

LCG $Date: 2008/09/24 11:25:01 $ RFIO_POPEN(3)

Referenced By

rfio_pclose(3) is an alias of rfio_popen(3).