bug:00059 returning non zero from process() doesn't cause the client to be kicked

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

bug:00059 returning non zero from process() doesn't cause the client to be kicked

Jack O'Quin-2

I was just looking at this report[1].  It seems like a valid bug.

 [1] http://jackit.sourceforge.net/mantis/view.php?id=59

I'm sure this used to work.  Does anyone have any idea when this
problem first surfaced?
--
  joq


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: bug:00059 returning non zero from process() doesn't cause the client to be kicked

Florian Paul Schmidt-2
On Tue, 07 Jun 2005 23:43:23 -0500
"Jack O'Quin" <[hidden email]> wrote:

>
> I was just looking at this report[1].  It seems like a valid bug.
>
>  [1] http://jackit.sourceforge.net/mantis/view.php?id=59
>
> I'm sure this used to work.  Does anyone have any idea when this
> problem first surfaced?

Oh, btw: i'm not sure about my last comment in that bugreport as the API
docs aren't 100% clear to me:

[1]: http://jackit.sourceforge.net/docs/reference/html/jack_8h.html#a8
[2]: http://jackit.sourceforge.net/docs/reference/html/types_8h.html#a9

[1] talks about a non zero error code returned by
jack_set_process_callback() which then causes the client to be removed
from the process graph. Which is funny, because the client never was
part of the process graph if it didn't successfully register a process
callback.

[2] says nothing about what is supposed to happen when the process
callback itself returns a non zero error code.

So my bugreport back then was based on my confusion and slightly unclear
api docs. Maybe we should clarify the intended semantics first:

- Should a client get kicked if it returns non zero from the process
callback?

- How to interpret the error code returned by [1]?

Regards,
Flo

--
Palimm Palimm!
http://affenbande.org/~tapas/


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: bug:00059 returning non zero from process() doesn't cause the client to be kicked

Jack O'Quin-2
Florian Schmidt <[hidden email]> writes:

> Oh, btw: i'm not sure about my last comment in that bugreport as the API
> docs aren't 100% clear to me:
>
> [1]: http://jackit.sourceforge.net/docs/reference/html/jack_8h.html#a8
> [2]: http://jackit.sourceforge.net/docs/reference/html/types_8h.html#a9
>
> [1] talks about a non zero error code returned by
> jack_set_process_callback() which then causes the client to be removed
> from the process graph. Which is funny, because the client never was
> part of the process graph if it didn't successfully register a process
> callback.
>
> [2] says nothing about what is supposed to happen when the process
> callback itself returns a non zero error code.
>
> So my bugreport back then was based on my confusion and slightly unclear
> api docs. Maybe we should clarify the intended semantics first:
>
> - Should a client get kicked if it returns non zero from the process
> callback?

Yes.  I'm sure that used to happen at one time.

Right now, all it does is leave the client in the Running state
(instead of the Finished state).  I am unclear about what happens
after that.  Maybe the engine is supposed to detect that it never
Finished and time it out?  I believe that is what it did before
(resulting in a horribly confusing error message).

A proper fix (maybe not for this release) might involve an additional
state to represent an explicit shutdown request.

> - How to interpret the error code returned by [1]?

The only two return codes from jack_set_process_callback() are 0 for
success, and -1 for when the client was already active (not allowed).
The doc is wrong, the active client is *not* removed from the process
graph.

Most of those older JACK interfaces don't return any useful error
codes (some newer ones do).  This one should probably return something
a little more informative, like EBUSY.  You should just check for zero
or non-zero as it is.

Thanks for the report, BTW.  There's no telling how long this was
broken without anyone noticing.
--
  joq


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel