FROM : Sherm Pendley
DATE : Sun Apr 29 13:23:57 2007
On Apr 29, 2007, at 7:08 AM, Philip Q wrote:
> On 29/04/07, Daniel <daniel.<email_removed>> wrote:
>> it is the first time I work with Cocoa and I wanted to know if there
>> is a way to launch a second application from the running one (and for
>> that I have found something) _and_ additionally being able to montior
>> this process/application in such a way to know exactly which file it
>> has opened for writing, which one he has created.
>>
>
> Creating a child process is pretty simple using NSTask (although, is
> there a specific reason you want to use a child process and not a
> thread?).
>
> However, getting a list of the open files is not a trivial task
Just use the aforementioned simple NSTask to run 'lsof'. :-)
Or, if you know *where* the files will be opened, just watch that
directory with kqueue.
sherm--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
DATE : Sun Apr 29 13:23:57 2007
On Apr 29, 2007, at 7:08 AM, Philip Q wrote:
> On 29/04/07, Daniel <daniel.<email_removed>> wrote:
>> it is the first time I work with Cocoa and I wanted to know if there
>> is a way to launch a second application from the running one (and for
>> that I have found something) _and_ additionally being able to montior
>> this process/application in such a way to know exactly which file it
>> has opened for writing, which one he has created.
>>
>
> Creating a child process is pretty simple using NSTask (although, is
> there a specific reason you want to use a child process and not a
> thread?).
>
> However, getting a list of the open files is not a trivial task
Just use the aforementioned simple NSTask to run 'lsof'. :-)
Or, if you know *where* the files will be opened, just watch that
directory with kqueue.
sherm--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
| Related mails | Author | Date |
|---|---|---|
| Daniel | Apr 28, 23:15 | |
| Philip Q | Apr 29, 13:08 | |
| Sherm Pendley | Apr 29, 13:23 | |
| Philip Q | Apr 29, 15:20 |






Cocoa mail archive

