Changeset 198:168dadfccd08 in roaraudio


Ignore:
Timestamp:
07/20/08 21:35:00 (16 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added closefh, lenclose parameters to lib_run_bg to support to close fhs we do not know about

Location:
roard
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • roard/codecfilter_cmd.c

    r197 r198  
    1212 } 
    1313 
    14  if ( lib_run_bg(filter->options, ((struct roar_stream*)info)->fh, socks[1], ROAR_STDERR) == -1 ) 
     14 if ( lib_run_bg(filter->options, ((struct roar_stream*)info)->fh, socks[1], ROAR_STDERR, socks, 2) == -1 ) 
    1515  return -1; 
    1616 
  • roard/include/lib.h

    r183 r198  
    66#include <roaraudio.h> 
    77 
    8 int lib_run_bg(char * cmd, int infh, int outfh, int errfh); 
     8int lib_run_bg(char * cmd, int infh, int outfh, int errfh, int * closefh, int lenclose); 
    99 
    1010#endif 
  • roard/lib.c

    r186 r198  
    33#include "roard.h" 
    44 
    5 int lib_run_bg(char * cmd, int infh, int outfh, int errfh) { 
     5int lib_run_bg(char * cmd, int infh, int outfh, int errfh, int * closefh, int lenclose) { 
    66 pid_t child = fork(); 
    77 int fh[3] = {-1, -1, -1}; 
     
    3434 midi_free(); // close midi devices 
    3535 
     36 // close fh's we got ask to close: 
     37 for (i = 0; i < lenclose; i++) 
     38  close(closefh[i]); 
     39 
    3640 // TODO: what aout the output driver? 
    3741 
Note: See TracChangeset for help on using the changeset viewer.