dumpstream: bails out on retriable errors
With RC2, -dumpstream often fails for mms with : read error:: Resource temporarily unavailable Or if I suspend/resume read error:: Interrupted system call I fixed this by changing stream/asf_mmst_streaming.c, static int get_data (int s, char *buf, size_t count) { ssize_t len; size_t total = 0; while (total < count) { len = recv (s, &buf[total], count-total, 0); if (len<=0) { + if (errno == EAGAIN || errno == EINTR) + continue; perror ("read error:"); return 0; } .... Please include this fix in your next release. 5, 50, 500, 5000 - Store N number of mails in your inbox. Go to http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html
On Wed, Mar 05, 2008 at 07:59:42PM -0800, klchxbec wrote:
With RC2, -dumpstream often fails for mms with :
read error:: Resource temporarily unavailable
Or if I suspend/resume
read error:: Interrupted system call
I fixed this by changing stream/asf_mmst_streaming.c,
static int get_data (int s, char *buf, size_t count) { ssize_t len; size_t total = 0;
while (total < count) {
len = recv (s, &buf[total], count-total, 0);
if (len<=0) { + if (errno == EAGAIN || errno == EINTR) + continue;
What OS is this? EAGAIN is always an invalid value for errno except when the file descriptor is set to nonblocking mode. EINTR is invalid unless a signal handler is installed and the corresponding signal occurred. Neither of these should be the case for MPlayer.. BTW, posting a bug report without info on your OS is hardly the level of bug-reporting that merits using advusers... Rich
On Thu, 2008-03-06 at 00:06 -0500, Rich Felker wrote:
On Wed, Mar 05, 2008 at 07:59:42PM -0800, klchxbec wrote:
Or if I suspend/resume
read error:: Interrupted system call
when the file descriptor is set to nonblocking mode. EINTR is invalid unless a signal handler is installed and the corresponding signal occurred. Neither of these should be the case for MPlayer..
Then what would you expect suspend/resume to do? I haven't checked what standards say about that but I don't really see alternatives to EINTR.
On Thu, Mar 06, 2008 at 07:08:27AM +0200, Uoti Urpala wrote:
On Thu, 2008-03-06 at 00:06 -0500, Rich Felker wrote:
On Wed, Mar 05, 2008 at 07:59:42PM -0800, klchxbec wrote:
Or if I suspend/resume
read error:: Interrupted system call
when the file descriptor is set to nonblocking mode. EINTR is invalid unless a signal handler is installed and the corresponding signal occurred. Neither of these should be the case for MPlayer..
Then what would you expect suspend/resume to do? I haven't checked what standards say about that but I don't really see alternatives to EINTR.
There's no reason for it to have any effect on the read call. Rich
--- On Thu, 6/3/08, Rich Felker <dalias@aerifal.cx> wrote:
What OS is this? EAGAIN is always an invalid value for errno except when the file descriptor is set to nonblocking mode. EINTR is invalid unless a signal handler is installed and the corresponding signal occurred. Neither of these should be the case for MPlayer..
BTW, posting a bug report without info on your OS is hardly the level of bug-reporting that merits using advusers...
Apologies for not mentioning the OS. The reason is that I see this happen on at least two OSs : SUSE Linux 10.0 as well as HPUX 11.23 After I added the retry check for EAGAIN, I do not see the problem of aborting dumps. Did you know? You can CHAT without downloading messenger. Go to http://in.messenger.yahoo.com/webmessengerpromo.php/
participants (3)
-
klchxbec -
Rich Felker -
Uoti Urpala