Skip to content

Fish shell sends unexpected SIGPIPE to running processes #1926

@Jean-Daniel

Description

@Jean-Daniel

When running some commands, the shell kills my jobs before they complete.
fish shell is the only shell that behave this way, so I consider it a bug.

For instance, I'm trying to run that command:
lld -arch x86_64 -r -print_atoms Inputs/dtrace-x86_64.yaml -o Output/dtrace-x86_64.yaml.tmp -flavor darwin | FileCheck dtrace-x86_64.yaml

The first command (lld) try to link the input object, print some internal status to stdout and then write the produced object to disk.
The second command (FileCheck) parses the output produced by lld and check if it contains some values.

It is perfectly valid and expected that FileCheck terminates before lld as it may be done looking for string in the output before lld is done writing the result to disk. When running that command in any shell (bash, tcsh, …) everything works fine, but when running it in fish, at some arbitrary point, lld receives a SIGPIPE signal that cause termination resulting in incomplete execution: the produced file is not valid (or not created at all).

Note: The function responsible to kill the process is in proc.cpp[462]: kill(prev->pid,SIGPIPE);

Metadata

Metadata

Assignees

Labels

bugSomething that's not working as intended

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions