Python Forum
which exception do you get when you os.write() to a pipe that has nothing reading it?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
which exception do you get when you os.write() to a pipe that has nothing reading it?
#6
Skaperen Wrote:i'm thinking i need to go back and do some stuff in C, again, just to get my brain thinking about the system.

I wonder if the problem is not related to PEP 475, the fact that a system call which fails with EINTR is automatically retried by the standard library wrappers such as os.write() without raising an exception.

If this is the problem, you could perhaps give your program a chance to handle it by setting a signal handler, perhaps to catch signal.SIGPIPE.

documentation Wrote:signal.SIGPIPE
Broken pipe: write to pipe with no readers.

Default action is to ignore the signal.

Availability: Unix.
Reply


Messages In This Thread
RE: which exception - by Gribouillis - Jan-06-2023, 09:16 AM
RE: which exception do you get when you os.write() to a pipe that has nothing reading it? - by Gribouillis - Jan-08-2023, 03:38 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  pipe(s) in = subprocess.Popen() Skaperen 0 1,830 Feb-13-2021, 11:48 PM
Last Post: Skaperen
  re-open a Popen pipe in non-binary mode Skaperen 2 4,118 Jul-29-2019, 05:25 PM
Last Post: Skaperen
  stdin input while copying from a process pipe Skaperen 0 1,591 Jul-18-2019, 12:15 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020