Getting output from another program.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Today I discovered the 'file' command.  I was immediately embarrassed
and upset that I have gone so long without ever running into it.  It
also made me think of a few questions.

1. Is there a C library that provides equivalent or similar
functionality (especially for identifying MIME types)?

2. What's the best practice for getting output from an external command?
 I've heard of it being done by forking, overwriting the child's file
descriptors for stdin and stdout with pipes, and then exec'ing the
command.


-- 
Topher Fischer
GnuPG Fingerprint: 3597 1B8D C7A5 C5AF 2E19  EFF5 2FC3 BE99 D123 6674
javert42@xxxxxxxxxx

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Assembler]     [Git]     [Kernel List]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [C Programming]     [Yosemite Campsites]     [Yosemite News]     [GCC Help]

  Powered by Linux