• 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: How to pass filenames to system( ) ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >How to pass filenames to system( ) ? (From: Patrick Stadelmann <email@hidden>)
 >Re: How to pass filenames to system( ) ? (From: Quinn <email@hidden>)
 >Re: How to pass filenames to system( ) ? (From: Patrick Stadelmann <email@hidden>)

  • Prev by Date: Re: How to pass filenames to system( ) ?
  • Next by Date: Re: How to pass filenames to system( ) ?
  • Previous by thread: Re: How to pass filenames to system( ) ?
  • Next by thread: Re: How to pass filenames to system( ) ?
  • Index(es):
    • Date
    • Thread