rfio_popen man page

RFIO_POPEN(3)               Rfio Library Functions               RFIO_POPEN(3)

[1mNAME[0m
      rfio_popen, rfio_pclose - start a process and open a pipe to it

[1mSYNOPSIS[0m
      [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

[1mDESCRIPTION[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
      executed.

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

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

[1mEXAMPLE[0m
           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);

[1mRETURN VALUE[0m
      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.

[1mERRORS[0m
      [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

[1mAUTHOR[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).