The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Quiq::Ipc - Interprozesskommunikation

BASE CLASS

Quiq::Object

METHODS

Methods

filter() - Rufe ein Kommando als Filter auf

Synopsis

  $out = Quiq::Ipc->filter($cmd,$in,@opt);
  ($out,$err) = Quiq::Ipc->filter($cmd,$in,@opt);
  $out = Quiq::Ipc->filter($cmd,@opt);
  ($out,$err) = Quiq::Ipc->filter($cmd,@opt);

Options

-ignoreError => $bool (Default: 0)

Ignoriere Exitcode von Kommando $cmd. D.h. es wird keine Exception geworfen, wenn das Kommando fehlschlägt.

Description

Rufe Kommando $cmd als Filter auf. Das Kommando erhält die Daten $in auf stdin und liefert die Daten $out und $err auf stdout bzw. stderr. In Skalarkontext wird nur die Ausgabe auf stdout geliefert.

Achtung: Der Aufruf kann zu einem SIGPIPE führen, wenn per Parameter $in Daten an $cmd gesendet werden und das Kommando terminiert, bevor es alle Daten gelesen hat. Insbesondere sollten keine Daten an ein Kommando gesendet werden, das nicht von stdin liest!

VERSION

1.188

AUTHOR

Frank Seitz, http://fseitz.de/

COPYRIGHT

Copyright (C) 2020 Frank Seitz

LICENSE

This code is free software; you can redistribute it and/or modify it under the same terms as Perl itself.