• 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: Calling cocoa app from command line
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calling cocoa app from command line


  • Subject: Re: Calling cocoa app from command line
  • From: "Clark Cox" <email@hidden>
  • Date: Thu, 15 Mar 2007 14:52:47 -0700

On 3/14/07, Mark Ritchie <email@hidden> wrote:
On 14-Mar-07, at 3:47 PM, Daryl Thachuk wrote:
> Look at 'open'

or if you know the path to the application then launch it directly:
.../MyApp.app/Contents/MacOS/MyApp

Just an FYI to the OP. These will result in very different running environments for your program, and would be desirable in different situations.

'open' will open the application just as double clicking on it would
have. This means that if an instance of your app is already running,
it will simply be reactivated (i.e. open will not start a new instance
of your application)

Running it directly from the command-line (i.e. the second suggestion
above) will run it as a subprocess of your shell. This means that it
will inherit your shell's environment, and will have its stdin/out
attached to the same files as the shell itself, etc. *and* it will not
reactivate an already running instance of your app.


-- Clark S. Cox III email@hidden _______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Calling cocoa app from command line
      • From: Mark Ritchie <email@hidden>
    • Re: Calling cocoa app from command line
      • From: John Stiles <email@hidden>
References: 
 >Calling cocoa app from command line (From: dew drops <email@hidden>)
 >Re: Calling cocoa app from command line (From: Daryl Thachuk <email@hidden>)
 >Re: Calling cocoa app from command line (From: Mark Ritchie <email@hidden>)

  • Prev by Date: Re: Reordering of outlineview objects after rename
  • Next by Date: Re: Calling cocoa app from command line
  • Previous by thread: Re: Calling cocoa app from command line
  • Next by thread: Re: Calling cocoa app from command line
  • Index(es):
    • Date
    • Thread