Opened 7 years ago

Last modified 7 years ago

#2044 new defect

using strace -p on running mplayer (dumpstream) lets mplayer die

Reported by: oliver@… Owned by: reimar
Priority: normal Component: streaming
Version: unspecified Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:

Description

Using strace -p on running mplayer (dumpstream) lets mplayer die.

So strace can't be used on an already running streamdumping mplayer.

Looked at the problem in detail I found out, that
there was an interrupted systemcall.

mplayer was so nice to mention this, printing the
error message for that case.

I located the problem in stream/networking.c
in function nop_streaming_read()
which is calling recv().

I also have added some lines of code and could fix the problem.
See the attached patch.

General Remark:
I also looked into the code of mplayer; it is using signal().
This is the unreliable signalling system.
In general it would be better to use sigaction()-semantics instead of
signal, because that is the reliable signalling stuff.

Attachments (1)

patch_for_strace_on_streamdump.diff (505 bytes) - added by oliver@… 7 years ago.
Added a Label and a goto (sic!) to allow restarting the recv() call

Download all attachments as: .zip

Change History (2)

Changed 7 years ago by oliver@…

Added a Label and a goto (sic!) to allow restarting the recv() call

comment:1 Changed 7 years ago by oliver@…

I used the svn version of mplayer: SVN-r4426-4.6.2

Note: See TracTickets for help on using tickets.