diff options
Diffstat (limited to '')
-rw-r--r-- | util/iobuf.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/util/iobuf.c b/util/iobuf.c index 1a97e564f..26cde114f 100644 --- a/util/iobuf.c +++ b/util/iobuf.c @@ -1005,6 +1005,16 @@ check_special_filename ( const char *fname ) return -1; } +/* This fucntion returns true if FNAME indicates a PIPE (stdout or + stderr) or a special file name if those are enabled. */ +int +iobuf_is_pipe_filename (const char *fname) +{ + if (!fname || (*fname=='-' && !fname[1]) ) + return 1; + return check_special_filename (fname) != -1; +} + /**************** * Create a head iobuf for reading from a file * returns: NULL if an error occures and sets errno |