Application Adding Argument

Discussion in 'Mac Programming' started by macscriptnew, Jun 7, 2006.

  1. macrumors newbie

    Joined:
    Jun 6, 2006
    #1
    Hi,

    I created a simple application and if i go into the package contents and run the executable it runs fine, but if i click on the icon and try to run it the application is adding an argument to the executable and i get this

    paraprof: unknown option '-psn_0_2621441'
    Usage: paraprof [--pack <file>] [--dump] [-p] [-m] [-i] [-f <filetype>] <files/directory>

    where paraprof is the name of the executable.

    does anyone know why it is adding the -psn_0_2621441 when i try to run it from the icon?
     
  2. macrumors 601

    HiRez

    Joined:
    Jan 6, 2004
    Location:
    Western US
    #2
    PSN is the process serial number, which OS X passes as an argument to all applications. It's used for various system things for identifying and discriminating different processes (it will be unique for each time any process is launched). From the Apple dev docs:
     
  3. macrumors 68000

    savar

    Joined:
    Jun 6, 2003
    Location:
    District of Columbia
    #3
    *All applications = all applications which connect to Carbon or Cocoa, from what I can tell. There are a number of unix processes that don't get PSNs.

    Edit: ..or maybe its processes which connect to the window server?
     
  4. macrumors newbie

    Joined:
    Jun 23, 2006
    #4
    How do I get the path of a file that is dropped onto my icon? All I get is the same -pxn-XXXX stuff, no filename.
     

Share This Page