[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] Eksekvere kommando og læse output



On Wed, 8 Mar 2000 21:10:27 +0100 (CET), Valery Kotchiev
<sslug@sslug> wrote:
> Hvad med at bruge et standart library funktion "popen" med en tilsvarende
> "pclose".
> De fungerer på samme måde som almindelige filhåndteringsfunktioner, men
> bruger et program som kilde til dataen. Check "man popen" for mere info.
> Det er _meget_ nemmere end at lave det hele ved fork,dup-håndkraft.

Det er rigtig nok i dette tilfælde, men som nævnt et andet sted i denne tråd,
er popen envejs. Den er envidere en del langsommere da den først laver en fork
og en pipe, derefter en exec shell, der fork()'er igen til det program man vil
køre.

Jeg bruger aldrig selv popen(), og jeg synes nu heller ikke det er så meget
håndarbejde der skal laves. 

-- 
Most kind regards,
Kristian Bjoernskov, <mailto:sslug@sslug>
Novo Nordisk IT, Network - internet.
Phone: +45 4442 3299. Fax: +45 4442 6061


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *