On Wednesday 20 January 2010 03:36:49 am Richard Frith-Macdonald wrote:
>
> On 20 Jan 2010, at 09:48, Derek Zhou wrote:
>
> > Oops, hit send too soon.
> >
> > #import
> >
> > int main(int argc, char** argv)
> > {
> > NSTask* editor = [NSTask new];
> > [editor setLaunchPath: @"vi"];
> > [edi
Actually, I believe OSX (10.4.11 anyway) calls setsid() not setpgrp().
However, setsid() also causes a new process group to be created.
Using the supplied program, but running /bin/cat and then examining with
'ps ajx' I see:
User PID PPID PGIDSESS JOBC STAT TT TIME COMMAND
der
On 20 Jan 2010, at 09:48, Derek Zhou wrote:
> Oops, hit send too soon.
>
> #import
>
> int main(int argc, char** argv)
> {
> NSTask* editor = [NSTask new];
> [editor setLaunchPath: @"vi"];
> [editor launch];
> [editor waitUntilExit];
> NSLog(@"finished\n");
> }
>
> with the setpgrp (curr
On 20 Jan 2010, at 09:48, Derek Zhou wrote:
#import
int main(int argc, char** argv)
{
NSTask* editor = [NSTask new];
[editor setLaunchPath: @"vi"];
[editor launch];
[editor waitUntilExit];
NSLog(@"finished\n");
}
I can confirm that, on OS X, once you've fixed it to specify the full
p
On Wednesday 20 January 2010 01:57:10 am Richard Frith-Macdonald wrote:
> I think the background process is stopped if it tries to *read*, not if it
> tries to write.
> I also strongly suspect that this is the behavior expected by most people ...
> if background processes were freely able to read
On 20 Jan 2010, at 09:25, Derek Zhou wrote:
> On Wednesday 20 January 2010 12:15:11 am Richard Frith-Macdonald wrote:
>>
>> On 20 Jan 2010, at 07:21, Derek Zhou wrote:
>>> Here is a simple patch. It just don't setpgrp if the process is on a tty.
>>
>> Actually, the patch effects the task's pro
On Wednesday 20 January 2010 01:25:51 am Derek Zhou wrote:
> On Wednesday 20 January 2010 12:15:11 am Richard Frith-Macdonald wrote:
> >
> > On 20 Jan 2010, at 07:21, Derek Zhou wrote:
> > > Here is a simple patch. It just don't setpgrp if the process is on a tty.
> >
> > Actually, the patch eff
On Wednesday 20 January 2010 12:15:11 am Richard Frith-Macdonald wrote:
>
> On 20 Jan 2010, at 07:21, Derek Zhou wrote:
> > Here is a simple patch. It just don't setpgrp if the process is on a tty.
>
> Actually, the patch effects the task's process group setting if the *parent*
> task is on a t
On 20 Jan 2010, at 07:21, Derek Zhou wrote:
> On Tuesday 19 January 2010 10:14:15 pm Derek Zhou wrote:
>> On Tuesday 19 January 2010 12:59:28 am Derek Zhou wrote:
>>> hi all,
>>> it seems NSTask setpgrp after the fork:
>>> ...
>>> /*
On Tuesday 19 January 2010 10:14:15 pm Derek Zhou wrote:
> On Tuesday 19 January 2010 12:59:28 am Derek Zhou wrote:
> > hi all,
> > it seems NSTask setpgrp after the fork:
> > ...
> > /*
> >
> >* Make sure task i
On 20 Jan 2010, at 06:14, Derek Zhou wrote:
> On Tuesday 19 January 2010 12:59:28 am Derek Zhou wrote:
>> hi all,
>> it seems NSTask setpgrp after the fork:
>> ...
>> /*
>>
>> * Make sure task is run in it's own p
On Tuesday 19 January 2010 12:59:28 am Derek Zhou wrote:
> hi all,
> it seems NSTask setpgrp after the fork:
> ...
> /*
>
>* Make sure task is run in it's own process group.
>
>*/
12 matches
Mail list logo