Re: Find argument passed to running process
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On 03.09.2009, at 05:11, Michael Smith wrote: On Sep 2, 2009, at 12:04 PM, darwin-dev-request@lists.apple.com wrote: Why do you think you want to do this? How would you address the basic problem? _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... Thanks all. My internet connection was down so I could not reply. Solution suggested by Terry using popen() and read argument is right, but I want to implement without using shell or system() or any other script. Please understand that when you are responding to Terry, you are talking to one of the small number of individuals tasked with maintaining this particular interface. His word on correct usage is as close to final as anything you're going to get. Please also understand that the information returned by ps for a process' arguments is not guaranteed to be correct or parseable. If you require a contract with the calling task, you must arrange for the calling task to save the argument information somewhere else. Nico misses the point when complaining that the output is not reliable; it is not meant to be a communcation channel, it is meant to be informative. I didn't mean to complain :). This was meant as an argument for an interface that *is* reliable. On the subject of procfs; folks, you are trying to solve the wrong problem. Adding another access method absent a sensible schema does nothing to address the basic problem. This email sent to site_archiver@lists.apple.com
participants (1)
-
Nico Schmidt