Re: crash-proof AU plugin scanning?
Re: crash-proof AU plugin scanning?
- Subject: Re: crash-proof AU plugin scanning?
- From: "Ross Bencina" <email@hidden>
- Date: Wed, 30 Jun 2010 18:44:54 +1000
Hi Brian
Thanks for that, its a good idea. I wonder though, whether auval has a
standard output format for supported and default channel counts etc which I
could depend on even in future OS releases...
Perhaps its not so much more work to make a separate AU-scanner executable.
Not sure how to suppress Apple crash reports if it crashes though.
Thanks!
Ross
----- Original Message -----
From: "Brian Willoughby" <email@hidden>
To: "Ross Bencina" <email@hidden>
Cc: <email@hidden>
Sent: Wednesday, June 30, 2010 5:25 PM
Subject: Re: crash-proof AU plugin scanning?
On Jun 29, 2010, at 23:42, Ross Bencina wrote:
I guess I need to implement my scanner in a separate process or use
fork()
or something to avoid this kind of startup crash. Can anyone recommend a
best-practice approach for crash proofing AU scanning ? Given the
problems
I'm currently seeing with PACE protected pluigns I'm a little wary of
doing
the scanning in a separate process without knowing it will work.
In the old days :-) I used the system(3) API to run a shell process like
auval. This Unix API is documented as part of <stdlib.h> You get the
exit status of the command-line process, and I imagine that auval would
give you a pass/fail at a minimum.
If you want access to the actual textual output of the command-line
process, then use popen(3) and pclose(3), documented as part of <stdio.h>
These API give you bidirectional pipe forking, so you can write to the
process (not needed for auval) and read from the process (probably useful
for scanning results for particular text, although that might be a weak
approach given that auval could change in the future).
I suppose you could use fork(), but that's probably a lot more work
compared to popen().
I really don't know what the implications for PACE are, but if auval
works, then popen() should work exactly the same.
You can find these API in Xcode under Help->Open man page...
Brian Willoughby
Sound Consulting
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden