... @@ trap '' PIPE @@ trap -p trap -- '' SIGPIPE @@ sort tt | /usr/bin/less process attached to gdb using -p Terminate less with 'q' while process is running sort: write failed: 'standard output': Broken pipe sort: write error @@ ./gdb.sh 6056 ... Attaching to process 5628 [New Thread 5628.0x14b0] [New Thread 5628.0x1518] [New Thread 5628.0x1134] Reading symbols from /usr/bin/sort.exe...Reading symbols from /usr/lib/debug//usr/bin/sort.exe.dbg...done. done. 0x7711000d in ntdll!DbgBreakPoint () from /drv/c/Windows/SysWOW64/ntdll.dll (gdb) cont Continuing. [Thread 5628.0x1134 exited with code 0] Program received signal SIGPIPE, Broken pipe. [Switching to Thread 5628.0x14b0] 0x0040273f in write_line (line=0x14c, fp=0x28be38, output_file=0x6b17ccd6 ) at /usr/src/debug/coreutils-8.26-2/src/sort.c:2792 2792 if (fwrite (buf, 1, n_bytes, fp) != n_bytes) (gdb) bt #0 0x0040273f in write_line (line=0x14c, fp=0x28be38, output_file=0x6b17ccd6 ) at /usr/src/debug/coreutils-8.26-2/src/sort.c:2792 #1 0xffffffff in ?? () #2 0x00000000 in ?? () (gdb) cont Continuing. [Inferior 1 (process 5628) exited with code 01000] (gdb) quit @@ =====