• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: crash-proof AU plugin scanning?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: crash-proof AU plugin scanning?


  • Subject: Re: crash-proof AU plugin scanning?
  • From: Brian Willoughby <email@hidden>
  • Date: Wed, 30 Jun 2010 00:25:47 -0700


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


  • Follow-Ups:
    • Re: crash-proof AU plugin scanning?
      • From: Kyle Sluder <email@hidden>
    • Re: crash-proof AU plugin scanning?
      • From: "Ross Bencina" <email@hidden>
References: 
 >crash-proof AU plugin scanning? (From: "Ross Bencina" <email@hidden>)

  • Prev by Date: crash-proof AU plugin scanning?
  • Next by Date: RE: crash-proof AU plugin scanning?
  • Previous by thread: crash-proof AU plugin scanning?
  • Next by thread: Re: crash-proof AU plugin scanning?
  • Index(es):
    • Date
    • Thread