Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2011-09

SIGPIPE avoid or catch

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mattias Gaertner

Hi all,

When I start under Linux a process with TProcess [poUsePipes], write stuff to Input and the process exits I get a SIGPIPE (broken pipe), which kills my whole program immediately.

How can I catch or avoid the SIGPIPE with TProcess?

Mattias

Michael Van Canneyt
to Mattias Gaertner
Mattias Gaertner wrote 7 lines
Hi all, When I start under Linux a process with TProcess [poUsePipes], write stuff to Input and the process exits I get a SIGPIPE (broken pipe), which kills my whole program immediately. How can I catch or avoid the SIGPIPE with TProcess?

Just install a SIG_PIPE signal handler that ignores the handler ?

Michael.