On 20 Jan 2010, at 09:48, Derek Zhou wrote:
#import <Foundation/Foundation.h>
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
path, this runs vi(m) in the foreground, lets you edit things, and
then exits once vi has terminated. On FreeBSD/GNUstep, it displays
nothing on the screen, then when you hit control-c terminates.
So, the current behaviour in GNUstep is incorrect, although I'm not
sufficiently well versed with terminal behaviour to know how to
implement the correct behaviour.
Having multiple processes reading from the terminal is not a problem,
in general, because any program that runs a terminal program will
sleep until the child has exited. With the current implementation it
would not, for example, be possible to write a shell using GNUstep.
David
--
This email complies with ISO 3103
_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnustep-dev