Mount afp volume in console app

Can anyone tell me how to mount a volume using afp in a console application? I am worried that explicitly calling a shell will cause a segmentation fault in the original terminal execution. Should I be worried about this? or is there another way to do it?

My application runs on a mac, recurses through directories to find indesign files, and writes data about those files to a database. I have the application working now, and it is launching under a launch agent, but occaisionally the remote server volume we should b scanning is not mounted.

if you are interested, I could add a mount command to MBS Plugin…
Email me if you like to see that.

the “mount_afp” cmd line command should be all you need

[quote=249822:@Christian Schmitz]if you are interested, I could add a mount command to MBS Plugin…
Email me if you like to see that.[/quote]

The difference between help and spam

I made an offer to add a new command to not relay on a command line tool.
Sorry, if you don’t like it.

I disagree. I have no problem if Christian packages up something that already exists in the OS, as he often adds more features, supports it very well, lets me do things beyond my frontal-lobe-capacity and saves me huge amounts of time. I am assuming this feature would be free for existing MBS customers. Why not have two techniques to choose amongst rather than one?

Thanks for all the input.
Christian, as usual I very much appreciate your offer, but in this case Norman’s advice worked. I implemented a shell to run the command and it works.
Thanks again, everyone.