Re: How to pass filenames to system( ) ?
Re: How to pass filenames to system( ) ?
- Subject: Re: How to pass filenames to system( ) ?
- From: Quinn <email@hidden>
- Date: Wed, 3 Mar 2010 15:59:24 +0000
At 14:34 +0100 3/3/10, Patrick Stadelmann wrote:
Thanks for your answer. In the meantime, I tried escaping every
single character, and it seems to also work. Simpler, but less
memory efficient.
Memory consumption isn't really a worry on modern systems.
Traditionally, the biggest concern has been ARG_MAX. I just checked,
however, and the value for Mac OS X is 256 KB, which means you
probably don't have to worry about that either (-:
I didn't choose to use system(), I'm trying to modify the cups-pdf
tool (a virtual printer that enable batch printing to PDF, without
going through the print dialog), which use only portable functions.
The call to system() is used to invoke the .ps to .pdf interpreter,
something that could probably also be done differently on Mac OS X.
While NSTask is Mac OS X specific, things like fork/exec and
posix_spawn are not.
S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden